Download Swagger file
Here you can find the link to download the latest Swagger file for Direct selling API.
Here you can find the link to download the latest Swagger file for Direct selling API.
The Direct selling API allows you to retrieve offers that are published to a specific sales point on the direct sales channel, and sell products related to the offer. This API is mainly used for selling products through direct sales channels such as cash registers, self-service kiosks, or websites.
All information that passes through the Direct selling API is stored in Enviso.
In the context of using the Direct selling API, here's a short description of what certain terminologies imply.
Venue | A venue is an organisation unit that registers on the enviso sales application for selling their tickets through one or more sales channels (direct or indirect). |
Organisation | An organisation is the overarching term that is used for bundling multiple venue units. In this case, multiple venue units are part of one organisation. |
Sales point | A sales point is a physical or virtual location where orders can occur and sales can be made. Eg: Cash register (physical) or Web shop (virtual) |
Product | A product is a sell-able thing. In the context of the Direct selling API this can be referred to as a ticket. Eg: Adult safari ticket is referred to as a product. NoteResult of a product sale is a ticket barcode or a membership barcode. |
Offer | An offer is a bundle of Product(s) made available for selling. NoteStarting from version 4 of the Direct selling API, two types of offers are available - Ticket offers and Membership offers. Eg: An offer could consist of Adult safari ticket. While another offer could consist of two products, Adult safari ticket, and Child safari ticket. |
Capacity | Capacity refers to the restriction on the number of visitors for an offer. Capacity types are per day, per slot, and total. NoteCapacity applies to Ticket offer types only (and not Membership offers). |
Reservation | A reservation is a temporary reserved product. When a reservation is created, the total capacity is reduced with the number of products that are reserved. By default, the reservation time is 30 minutes but it can be configured on the offer level. This means when the system automatically expires the reservation, the reserved number of products will be added to the total capacity again. |
Basket | A basket is a bundle of temporarily reserved products. When the first reservation is created, a basket is automatically created as well. A basket can be altered by adding new reservations, editing existing reservations or removing reservations from the basket. |
Order | An order is the result of a basket checkout. When a basket is ready to be paid, then we can checkout the basket which will result in a new order. This is necessary to take the end-user to the payment step. |
Sale | A sale is the result of a paid order. When an order is paid, it results in a sale that contains links to both the order and the related payment details. |

Search products (offers)
The Direct selling API returns the offers which are published to the corresponding direct channel sales point. Every offer contains one or more products which can be sold.
Eg.: "Entrance to the museum" can be an offer where "Child ticket" & "Adult ticket" are it's products.
Create reservation
Create a reservation for a product. The needed capacity will be reserved for a temporary amount of time (by default 30 minutes).
Eg.: A family decides to visit the museum and wants to buy 2 "Adult tickets" and 1 "Child ticket". For this 2 reservations are needed.
The creation of your first reservation will automatically create a new basket to which new reservations can be added or existing reservations can be removed or altered.
Checkout order
Checkout the basket containing all the reservations to create an order which can be paid.
Once the order is created, the capacity is now reserved for a longer amount of time to make sure that the end user has time to finalize his payment.
Eg.: Both reservations are part of the same basket, so the basket containing 2 reservations from the previous step are bundled into a single order.
Pay (confirm) order
The visitor pays the order (= confirms the order) and as a result the corresponding sales are created in Enviso.
Eg.: The payment for the order that was created in previous step has been approved. By confirming the order, the sales are created in Enviso and the tickets (with barcodes or QR codes) are generated.
The following image shows a high-level overview of the domain model for the Direct Selling API.

The Direct selling API is a REST API solution and attempts to conform to the RESTful design principles.
Throughout the document, {version} stands for the first digit of the version in use.
Eg: If you are using version 4.0, {version} would mean v4
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)
For 'List' endpoints, such as List offers, List orders, and more, there may be several pages. Therefore, we recommend fetching pages until an empty page is returned.
Visitor form fields are used by Basket-related endpoints such as Checkout basket, Create basket, Edit basket, and so on. The following table shows the expected value type depending on the visitor form field type.
Form field type | Expected value type | Example |
|---|---|---|
text | string | "firstName": "john" |
select | string | "ageRange": "31-45" |
radio | string | "hotelBooking": "Yes" |
date | date | "dateOfBirth": "1990-01-01" |
numeric | number | "groupCount": 1 NoteSupports only numeric characters. The maximum limit is 20 characters. |
phone | string | "phone": "+3225555555" |
checkbox | string[] | "guidePreference": ["with French language knowledge", "with swimming knowledge"] NoteThe user will be able to select only from the predefined options. |
text area | string | "remarks": "Please send a reminder before visit" |
citizenship Id | string | "citizenshipId": "00.00.11-001.00" |
string | "email": "john@gmail.com" | |
country | string (two-letter country ISO code) | "country": "be" |
The following HTTP status codes are used within the Direct selling 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 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. NoteIt 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. |
409 | Conflict The request could not be handled due to a conflict. This can be caused by an update of a resource conflicting with a prior change or data being out-of-sync. 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 fail. |
429 | Too Many Requests The server received too many request 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. |
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_tokenCode | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field> must not exceed <field_max> characters. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
1012 | <field> must be between <field_min> and <field_max>. |
1013 | <field> must not be in the past. |
4004 | Order ID <field_identifier> is not valid. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4012 | Reservations should occur per offer. |
4013 | Reservation ID <field_identifier> has expired. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4021 | Timeslot ID is not in the offer period. |
4022 | Visit date cannot be in the past. |
4023 | Visit date is not in the offer period. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4091 | Duplicate Reservation ID found. |
4092 | A maximum of 25 tickets can be added at a time. |
4093 | A maximum of total 100 tickets can be added at a time in an order. |
4098 | The entity could not be saved. |
4101 | One or more products not found. |
4102 | Reservations should occur per offer. |
4103 | One or more reservations not found. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
4107 |
|
4014 | Reservation <field_identifier> is already confirmed. You can't create order for already confirmed reservation. |
4018 |
|
4019 | Product ID <field_identifier> cannot be reserved as the offer has expired. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4123 | Order should occur per offer. |
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 Direct selling API.
For this, you'll need to use the Authentication API.
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 Direct selling API.
Contact Vintia support to get your production environment keys of the Authentication API and Direct selling API.
Change the base URL from the staging environment to the production environment.
Production environment: https://api.enviso.io/directsellingapi
Staging environment: https://api.staging-enviso.io/directsellingapi
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | Filter offer using from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2018-01-20T00:00:00Z Remark: The NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | Filter offer using end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2018-01-20T23:59:59Z Remark: The NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
searchterm | string | false | Filter offers using the provided search term.
|
page | integer | false | Start page number for the range to show in the result set. If omitted, the first page of results will be returned.
Default: 0 (= first page) NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. Note
|
perpage | integer | false | Number of results per page. If omitted, the default page size will be used.
Default: 50 Note
|
language | string | false | The ISO 639-1 language code in which the offer information should be returned. Default: en |
offertype | string | false | Possible inputs:
|
updatedsince | date | false | When set, returns only those offers that have been updated since the given date (inclusive). Format: yyyy-MM-dd Example: updatedsince=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
salesstartdate | datetime | false | Filter sales period start from. Format: yyyy-MM-ddTHH:mm:ssZ Eg: salesstartdate=2020-09-01T00:00:00Z |
salesenddate | datetime | false | Filter sales period end. Format: yyyy-MM-ddTHH:mm:ssZ Eg: salesenddate=2020-09-01T00:00:00Z |
Success response code: 200 OK
The period will only be available for Ticket offer types.
Parameters:
Parameter | Description |
|---|---|
offerType |
|
ticketOfferType |
NoteApplicable only to offers with the type 'Ticket'. |
period | Available for 'Ticket' offer types. It does not apply to the 'Membership' offers type. In such cases, |
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
Possible error codes:
Code | Message |
|---|---|
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1012 | <field> must be between <field_min> and <field_max>. |
9023 | The provided value for <field> must be passed in <field_format> format. |
9024 | From date must be less than To date |
9025 | Sales Point ID <field_identifier> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": 0,
"offerType": "string",
"ticketOfferType": "string",
"name": "string",
"description": "string",
"shortDescription": "string",
"tags": [
"string"
],
"period": {
"start": "2026-08-17T06:15:44.782Z",
"end": "2026-08-17T06:15:44.782Z"
},
"salesPeriod": {
"start": "2026-08-17T06:15:44.782Z",
"end": "2026-08-17T06:15:44.782Z"
},
"imageUrl": "string",
"categories": [
{
"id": 0,
"name": "string"
}
]
}
]
{
"errors": [
{
"message": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
salespointid | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | true | The ISO 639-1 language code in which the offer information should be returned. Default: en |
Success response code: 200 OK
Possible error codes:
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
Parameters:
Parameter | Description |
|---|---|
offerType |
|
barcodeGenerationStrategy |
|
pricingStrategy |
|
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
minQuantity/maxQuantity | Minimum/Maximum quantity required in the basket to place an order. |
enforceMinQuantity | When enforced, the product should be in the basket to place an order. |
linkedOfferProducts | Only for voucher offers. |
ticketOfferType | 1 = Regular 2 = Group |
groupSize | The number of visitors per group. Applicable only to group offers. |
capacityfrequency |
|
startDate: datetime endDate: datetime | Eg: 2024-03-05T04:57:28.310Z |
startWith | Eg: OnPurchase |
period (type) |
|
capacityfrequency | This will always be 'Total' for vouchers. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offer": {
"id": 0,
"name": "string",
"description": "string",
"offerType": "string",
"tags": [
"string"
],
"products": [
{
"id": 0,
"name": "string",
"description": "string",
"unitPrice": 0,
"minQuantity": 0,
"maxQuantity": 0,
"enforceMinQuantity": true,
"imageUrl": "string",
"linkedOfferProducts": [
{
"id": 0,
"quantity": 0,
"linkedOfferId": 0,
"maxRedeemableTicketsPerOffer": 0
}
],
"isLoyaltyProduct": true,
"loyaltyInfo": {
"validationFields": [
"string"
],
"message": "string"
},
"isGiftAidProduct": true
}
],
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"imageUrl": "string",
"salesPeriod": {
"start": "2026-08-17T05:50:06.145Z",
"end": "2026-08-17T05:50:06.145Z"
},
"categories": [
{
"id": 0,
"name": "string"
}
]
},
"ticketOffer": {
"event": {
"id": 0
},
"startDate": "2026-08-17T05:50:06.145Z",
"endDate": "2026-08-17T05:50:06.145Z",
"ticketOfferType": "string",
"capacity": {
"defaultCapacity": 0,
"capacityFrequency": "string"
},
"visitDuration": "string",
"visitorFormId": "string",
"guideLanguages": [
"string"
],
"groupSize": 0,
"shortDescription": "string"
},
"membershipOffer": {
"shortDescription": "string",
"validity": {
"validityPeriod": {
"type": "string",
"startDate": "2026-08-17T05:50:06.145Z",
"endDate": "2026-08-17T05:50:06.145Z",
"startWith": "string",
"period": {
"type": "string",
"value": 0
},
"startTime": "string",
"endTime": "string",
"daysOfWeek": [
0
]
}
}
},
"voucherOffer": {
"startDate": "2026-08-17T05:50:06.145Z",
"endDate": "2026-08-17T05:50:06.145Z",
"linkedOfferId": 0,
"capacity": {
"defaultCapacity": 0,
"capacityFrequency": "string"
},
"visitorFormId": "string",
"shortDescription": "string"
}
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID to retrieve timeslots for. Offers will only be included in the result set when they are published to this sales point. |
id | number | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | The from date to fetch timeslots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | The to date to fetch timeslots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
Possible error code
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/timeslots");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/timeslots")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/timeslots");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/timeslots", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeslots": [{
"timeslot": {
"id": "number",
"start": "date",
"end": "date"
}
}]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
This endpoint is obsolete. Please refer to the response parameter imageURL in the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
key | string | true | The unique key of the image. |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/offers/0/images/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "image/png");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/offers/0/images/string")
.header("Accept", "image/png")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/offers/0/images/string");
xhr.setRequestHeader("Accept", "image/png");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "image/png",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
id | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | The from date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | The to date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
showfutureonly | boolean | false | Shows only future capacity. Eg: showfutureonly=true |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
You can directly use the visit date (without any date conversion) to fetch capacity and reserve ticket quantity for PerDay offers.
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
For Ticket Offer | |||
|---|---|---|---|
Parameter | TOTAL | PERDAY | PERSLOT |
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
Property:
Property | Value |
|---|---|
frequency |
|
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacities");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacities")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/capacities");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/capacities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"frequency": "string",
"capacities": [{
"quantity": "number",
"date": "date",
"timeslot": {
"id": "number",
"start": "date",
"end": "date"
}
}]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The unique identifier of the sales point. Offers will be included in the result set only when they are published to this sales point. |
id | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: fromdate=2019-01-01 |
todate | date | true | The to date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: todate=2019-01-31 |
quantity | integer | false | The ticket quantity to fetch the available days for. Default value: 1 Days will only be included in the result set when:
|
showfutureonly | boolean | false | Shows only future capacity. Moreover, an ongoing timeslot, that started in the past will also be shown. Default value: false |
Success response code: 200 OK
Possible error codes:
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/availabledays");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/availabledays")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/availabledays");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/availabledays", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"availableDays": [
"2024-04-04T05:04:45.028Z"
],
"capacityPerDay": [
{
"day": "2024-04-04T05:04:45.028Z",
"availability": {
"available": 0,
"total": 0
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
offerid | route | true | The unique identifier of the offer. |
salespointid | route | true | The unique identifier of the sales point. |
timeslotid | query | true | The unique identifier of the timeslot. |
{
"quantity": "number",
"visitors": "number"
}
Property | Type | Required | Description |
|---|---|---|---|
quantity | number | false | For Regular offer: For Group offer group ticket/Group offer per person ticket: Use a positive number to take capacity (taken capacity = increased). Use a negative number to release capacity (taken capacity = decreased) |
visitors | number | false | For Regular offer: For Group offer group ticket/Group offer per person ticket: Use a positive number to take capacity (taken capacity = increased). Use a negative number to release capacity (taken capacity = decreased) Note
When you provide this information with a Group offer group ticket/Group offer per person ticket, the capacity will be increased or decreased from the visitor quota only. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacity/taken");
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", "{\"quantity\":0,\"visitors\":0}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacity/taken")
.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("{\"quantity\":0,\"visitors\":0}")
.asString();
const data = "{\"quantity\":0,\"visitors\":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/directsellingapi/v4/salespoints/0/offers/0/capacity/taken");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"quantity\":0,\"visitors\":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", "/v4/salespoints/0/offers/0/capacity/taken", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
from | date | true | Filter offer from date. Format: yyyy-MM-dd Eg: from=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
to | date | true | Filter offer end date. Format: yyyy-MM-dd Eg: to=2023-04-30 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
The format for 'date' is yyyy-MM-dd.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/prices");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/prices")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/prices");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/prices", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"days": [{
"date": "date",
"products": [{
"id": "number",
"prices": ["number"],
"originalPrice": "number"
}]
}]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
date | date | true | Date to fetch price per timeslot. Format: yyyy-MM-dd NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
The format for 'to' and 'from' time slot is HH:mm:ss.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/priceperday");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/priceperday")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/priceperday");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/priceperday", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeslots": [{
"id": "number",
"from": "time",
"to": "time",
"products": [{
"id": "number",
"prices": "number",
"originalPrice": "number"
}]
}]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the offer. Eg: /offers/20/translation |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/offers/0/translation");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/offers/0/translation")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/offers/0/translation");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapiexample.com")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/offers/0/translation", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"translations": [
{
"language": "string",
"translation": {
"name": "string",
"description": "string",
"shortDescription": "string",
"tags": [
"string"
],
"products": [
{
"id": 0,
"name": "string",
"description": "string"
}
]
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
offerid | number | false | The unique identifier of the offer to filter links for a specific offer. Eg: /offers/links?offerid=20 |
page | number | false | The page of the offer-links list you want to receive. Default: 0 Eg: page=1 NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. Note
|
perpage | number | false | The number of offer links to receive per page. Default: 50 Eg: perpage=25 Note
|
Success response code: 200 OK
Property:
Property | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/offers/links");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/offers/links")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/offers/links");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/offers/links", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"sourceId": 0,
"destinationId": 0,
"type": "string"
}
]{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
id | number | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
date | date | false | The from date to fetch capacity for. Format: yyyy-MM-ddTHH:mm:ssZ Eg: 2019-01-01T00:00:00Z NoteDate range (fromdate - todate) can not exceed the maximum of 31 days. |
timeslotid | date | false | The TimeslotID for which the capacity details are needed. |
Success response code: 200 OK
For offers with TOTAL capacity, this will return the total capacity.
For offers with PERDAY capacity, this will return the capacity for a specific date.
For offers with PERSLOT capacity, this will return the capacity for a specific timeslot.
Parameters:
Parameter | Description |
|---|---|
capacity | 1 = Free Selling 2 = Allocated |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacity");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/offers/0/capacity")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/offers/0/capacity");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/offers/0/capacity", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"frequency": "string",
"capacity": {
"quantity": 0,
"date": "2024-04-04T05:08:06.860Z",
"timeslot": {
"id": 0,
"start": "2024-04-04T05:08:06.860Z",
"end": "2024-04-04T05:08:06.860Z"
}
}
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
from | date | true | The from date to be used for filtering. Format: yyyy-MM-dd Eg: from=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
till | date | true | The till date to be used for filtering. Format: yyyy-MM-dd Eg: to=2023-04-30 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
The date range (from - till) can not exceed the maximum of 31 days.
Success response code: 200 OK
An example of date in the response is '2024-07-28'.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/offers/0/passvalidity/dates");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/offers/0/passvalidity/dates")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/offers/0/passvalidity/dates");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/offers/0/passvalidity/dates", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"dates": [
"string"
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
trigger | enum | true | Get the cross-sell rules based on trigger type. Possible values:
Eg: trigger=Basket |
basketid | guid | false | This will work with the trigger Rule: If offer is equal to {offer} then show cross-sell rule. In this case, if the input basket has this {offer} only then the configured cross-sell offer will return. Eg: basketid=06554405-1067-4ca2-9a86-7f203718067d |
offerid | number | false | This will work with the trigger Evaluates the condition based on the provided Eg: offerid=101 |
selectedproductids | string | false | This will work when the condition is attached in a cross-sell rule with the product id. Evaluates the condition based on the provided Format: Comma-separated product ids. Eg: selectedproductids=101,102,103 |
selecteddate | date | false | This will work with the trigger Evaluate the condition based on the provided Format: yyyy-MM-dd Eg: selecteddate=2025-07-01 |
timeSlotId | number | false | This will work when condition is attached in cross sell rule with visit time. Evaluate condition based on provided Eg: timeSlotId=123 |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/cross-sell-offers");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/salespoints/0/cross-sell-offers")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/salespoints/0/cross-sell-offers");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/salespoints/0/cross-sell-offers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offers": [
{
"id": 0,
"name": "string",
"customSetting": {
"autoSelectProduct": true
},
"crossSellOfferTimeSlotWindow": {
"isEnabled": true,
"timeSlotWindows": [
{
"type": "string",
"from": "string",
"to": "string"
}
]
},
"limitTicketQuantityByMainOffer": {
"isEnabled": true,
"type": "string"
},
"requiredOfferSelection": true
}
]
}{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the event. |
Name | Type | Required | Description |
|---|---|---|---|
includetimeslots | boolean | false | Whether to include the time slot in the response or not. Default: true Eg: /events/123?includetimeslots=false |
Success response code: 200 OK
Enum values:
Booking type | 1 = Single-slot 2 = All slots |
Event status | 0 = Draft 1 = Active 2 = Inactive 3 = Archived |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/events/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/events/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"name": "string",
"description": "string",
"startDate": "dateTime",
"endDate": "dateTime",
"quantity": "number",
"pictureUrl": "string",
"timeSlots": [
{
"id": "number",
"start": "dateTime",
"end": "dateTime",
"isBlocked": "boolean"
}
],
"hasTimeSlots": "boolean",
"address": {
"latitude": "number",
"longitude": "number",
},
"tags": [
{
"label": "string",
}
],
"bookingType": 1,
"status": "number"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the event. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | Filter time slots using the from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2018-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | Filter time slots using the end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2018-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
isblocked | boolean | false | Filter using time slot status. isblocked = true only blocked time slots isblocked = false only free time slots |
page | integer | true | The start page number for the range to show in the result set. If omitted, the first page of the results will be returned. Default: 0 (=first page) Note
NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. |
perpage | integer | true | The number of results per page. If omitted, the default page size will be used. Default: 50 Note
|
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/events/0/timeslots");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/events/0/timeslots")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/events/0/timeslots");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("GET", "/v4/events/0/timeslots", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"start": "date",
"end": "date",
"isBlocked": "boolean"
}
]
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID on which you want to create a basket. Eg: salespointid=21 |
[{
"productId": "number",
"quantity": "number",
"voucher": "string",
"quantityPerProducts": [
{
"productId": "number",
"quantity": "number"
}
],
"validity":
{
"from" : "date",
"till" : "date"
},
"visitDate": "date",
"timeslotId": "number",
"guideLanguage": "string",
"visitors": [{
"<key>": "<value>"
}],
"formId": string,
"loyaltyCardInfo": {
"cardNumber": string
}
"productVisitors":[{
"productId": "number",
"visitors": [{
"<key>": "<value>"
}]
Parameters:
Parameter | Description |
|---|---|
quantity | When reserving a group offer with group tickets, quantity is the number of visitors. |
voucher | This property should only be used when exchanging a voucher. It cannot be combined with the |
quantityPerProducts | This property should only be used when exchanging a voucher combined with |
validity | This is for membership offers with flexible dates. |
loyaltyCardInfo | This property is only required when making a reservation for a loyalty product. |
ProductVisitors | This property should be used when exchanging a voucher and the linked ticket offer has per-visitor info form enabled. It can also be used with a ticket offer, but in that case, the root-level "visitors" array is not required. |
productId | This property under Do Not include this property when sending a ticket offer without a voucher. |
Response parameters per capacity type
Depending on the frequency, the content of the request body should be different:
= Included in the response
= Not included in the response
Ticket offer | Membership offer | Exchange voucher | |||
|---|---|---|---|---|---|
Parameter | TOTAL | PERDAY | PERSLOT | ||
productId |
|
|
|
|
|
quantity |
|
|
|
|
|
voucher |
|
|
|
|
|
visitDate |
|
|
|
|
|
timeslotId |
|
|
|
|
|
quantityPerProducts** |
|
|
|
|
|
Validity |
|
|
|
|
|
Remark: While using the quantityPerProducts parameter, the originally specified quantity in the create basket request is no longer utilised.
Success response code: 201 Created
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets");
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", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/baskets")
.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("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]")
.asString();
const data = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]";
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/directsellingapi/v4/baskets");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]"
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", "/v4/baskets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "GUID"
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Success response code: 200 OK
Parameter | Description |
|---|---|
voucher | It will be filled only when the ticket reservation is created by exchanging a voucher. |
validity | This is for membership offers with flexible dates. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expireOn": "2024-03-12T11:10:56.560Z",
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"OriginalPrice": 0,
"discountCodes": [
"string"
],
"discountSources": [
{
"type": "string",
"name": "string"
}
],
"reservations": {
"ticketReservations": [
{
"id": 0,
"offerId": 0,
"visitDate": "2024-03-12T11:10:56.560Z",
"timeSlot": {
"id": 0,
"from": "2024-03-12T11:10:56.560Z",
"to": "2024-03-12T11:10:56.560Z"
},
"guideLanguage": "string",
"groups": [
{
"numberOfVisitors": 0
}
],
"voucher": "string",
"productReservations": [
{
"id": 0,
"productId": 0,
"quantity": 0,
"unitPrice": 0,
"originalUnitPrice": 0,
"isGiftAid": true,
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
}
}
],
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"reservedAt": "2024-01-27T13:07:26.260Z",
"mainOfferReservationConstraint": {
"reservationId": 0,
"quantityConstraint": "MustMatch",
"requiredOfferSelectionConstraint": null
},
}
],
"membershipReservations": [
{
"id": 0,
"offerId": 0,
"productReservations": [
{
"id": 0,
"productId": 0,
"unitPrice": 0,
"originalUnitPrice": 0,
"membershipHolder": {
"relationId": 0
},
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"validity":
{
"from" : "date",
"till" : "date"
}
}
],
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"reservedAt": "2024-01-27T13:08:33.651Z"
}
],
"voucherReservations": [
{
"id": 0,
"offerId": 0,
"productReservations": [
{
"id": 0,
"productId": 0,
"quantity": 0,
"unitPrice": 0,
"originalUnitPrice": 0,
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"linkedProducts": [{
"id": 0,
"quantity": 0
}]
}
],
"pricing": {
"subtotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"reservedAt": "2024-01-27T13:07:55.307Z",
"mainOfferReservationConstraint": {
"reservationId": 0,
"quantityConstraint": "MustMatch",
"requiredOfferSelectionConstraint": null
},
}
]
},
"isGiftAidConsent": boolean
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08");
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);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Request body (with dynamic checkout form):
[{
"productId": "number",
"quantity": "number",
"voucher": "string",
"quantityPerProducts": [
{
"productId": "number",
"quantity": "number"
}
],
"visitDate": "date",
"validity":
{
"from" : "date",
"till" : "date"
},
"timeslotId": "number"
"guideLanguage": "string",
"visitors": [{
"<key>": "<value>"
}],
"formId": string,
"loyaltyCardInfo": {
"cardNumber": string
},
"productVisitors":[{
"productId": "number",
"visitors": [{
"<key>": "<value>"
}]
}]
Request body (without dynamic checkout form):
[{
"productId": "number",
"quantity": "number",
"visitDate": "date",
"validity":
{
"from": "date",
"till": "date"
},
"timeslotId": "number",
"guideLanguage": "string"
]}Parameters:
Parameter | Description |
|---|---|
quantity | When reserving a group offer with group tickets, this is the number of visitors. |
voucher | This property should only be used when exchanging a voucher. It cannot be combined with the properties |
quantityPerProducts | This property should only be used when exchanging a voucher combined with |
validity | This is for membership offers with flexible dates. |
loyaltyCardInfo | This property is only required when making a reservation for a loyalty product. |
productVisitors | This property should be used when exchanging a voucher and the linked ticket offer has per-visitor info form enabled. It can also be used with a ticket offer, but in that case, the root-level "visitors" array is not required. |
productId | This property under Do Not include this property when sending a ticket offer without a voucher. |
Depending on the frequency, the content of the request body should be different:
Response parameters per capacity type:
= Included in the response
= Not included in the response
For Ticket Offer | For Membership Offer | Exchange Voucher | |||
|---|---|---|---|---|---|
Parameter | TOTAL | PERDAY | PERSLOT | ||
productId |
|
|
|
|
|
quantity |
|
|
|
|
|
visitDate |
|
|
|
|
|
timeslotId |
|
|
|
|
|
formId |
|
|
|
|
|
validity |
|
|
|
|
|
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations");
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", "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations")
.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("[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]")
.asString();
const data = "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]";
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}]}]"
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", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
reservationid | number | true | The ID of the reservation. |
Request body (with dynamic checkout form):
[{
"productId": "number",
"quantity": "number",
"visitDate": "date",
"timeslotId": "number"
"guideLanguage": "string",
"visitors": [{
"<key>": "<value>"
}],
"formId": string
}]
Request body (without dynamic checkout form):
{
"productId": "number",
"quantity": "number",
"visitDate": "date",
"timeslotId": "number",
"guideLanguage": "string"
}
Success response code: 204 No content
Parameter:
Parameter | Description |
|---|---|
quantity | When reserving a group offer with group tickets, this is the number of visitors. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/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", "{\"quantity\":0,\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/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("{\"quantity\":0,\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"}]}")
.asString();
const data = "{\"quantity\":0,\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"quantity\":0,\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"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", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
reservationid | number | true | The ID of the reservation. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/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);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
If the discount has already expired, this operation will fail with an HTTP 410 Gone.
Please ensure to URL-encode the discount code when using reserved characters such as a forward slash ('/').
Failing to do so might cause errors, as the resulting URL may get interpreted as a different route/code.
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
code | string | true | The discount code. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
code | string | true | The discount code. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
{
"productId": "number",
"cardNumber": "string",
"pin": "string",
"firstName": "string",
"postalCode": "string"
}
Parameter | Description |
|---|---|
productId | The loyalty product the card will be used for. |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/validate-loyalty-card");
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", "{\"productId\":0,\"cardNumber\":\"string\",\"pin\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/baskets/validate-loyalty-card")
.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("{\"productId\":0,\"cardNumber\":\"string\",\"pin\":\"string\"}")
.asString();
const data = "{\"productId\":0,\"cardNumber\":\"string\",\"pin\":\"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/directsellingapi/v4/baskets/validate-loyalty-card");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"productId\":0,\"cardNumber\":\"string\",\"pin\":\"string\"}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("POST", "/v4/baskets/validate-loyalty-card", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"isValidLoyaltyCard": "boolean"
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Adds one or more cross-sell reservations to the basket. (This endpoint supports ticket and product voucher offers.)
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
salespointid | int | true | The sales point’s ID |
mainofferreservationid | int | true | Reservation ID for main offer |
trigger | int | true | Trigger of reservation 1 → Basket 2 → Date Selection |
Request body (with dynamic checkout form):
[{
"productId": "number",
"quantity": "number",
"voucher": "string",
"quantityPerProducts":
{
"productId": "number",
"quantity": "number"
}
],
"visitDate": "date",
"validity":
{
"from" : "date",
"till" : "date"
},
"timeslotId": "number"
"guideLanguage": "string",
"visitors": [{
"<key>": "<value>"
}],
"formId": string,
"loyaltyCardInfo": {
"cardNumber": string
},
"productVisitors":[{
"productId": "number",
"visitors": [{
"<key>": "<value>"
}]
}]
}]
Request body (without dynamic checkout form):
[{
"productId": "number",
"quantity": "number",
"visitDate": "date",
"validity":
{
"from": "date",
"till": "date"
},
"timeslotId": "number",
"guideLanguage": "string"
]}Parameters:
Parameter | Description |
|---|---|
quantity | When reserving a group offer with group tickets, this is the number of visitors. |
voucher | This property should only be used when exchanging a voucher. It cannot be combined with the properties |
quantityPerProducts | This property should only be used when exchanging a voucher combined with |
validity | This is for membership offers with flexible dates. |
loyaltyCardInfo | This property is only required when making a reservation for a loyalty product. |
productVisitors | This property should be used when exchanging a voucher and the linked ticket offer has per-visitor info form enabled. It can also be used with a ticket offer, but in that case, the root-level "visitors" array is not required. |
productId | This property under Do Not include this property when sending a ticket offer without a voucher. |
Applicable formats when date is used for a form field:
MM/dd/yyyy, dd/MM/yyyy, yyyy-MM-dd, yyyy/MM/dd, dd-MM-yyyy, MM-dd-yyyy, MM.dd.yyyy, dd.MM.yyyy, yyyy.MM.dd
UTC date format YYYY-MM-DD
Eg: 1996-12-31
Depending on the frequency, the content of the request body should be different:
Response parameters per capacity type:
= Included in the response
= Not included in the response
For Ticket Offer | When exchanging vouchers | |||
|---|---|---|---|---|
Parameter | TOTAL | PERDAY | PERSLOT | |
productId |
|
|
|
|
quantity |
|
|
|
|
visitDate |
|
|
|
|
timeslotId |
|
|
|
|
formId |
|
|
|
|
validity |
|
|
|
|
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/cross-sell");
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", "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}],\"quantityPerProducts\":[],\"validity\":{\"from\":\"2019-08-24T14:15:22Z\",\"till\":\"2019-08-24T14:15:22Z\"},\"loyaltyCardInfo\":null,\"productVisitors\":[{}]}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/cross-sell")
.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("[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}],\"quantityPerProducts\":[],\"validity\":{\"from\":\"2019-08-24T14:15:22Z\",\"till\":\"2019-08-24T14:15:22Z\"},\"loyaltyCardInfo\":null,\"productVisitors\":[{}]}]")
.asString();
const data = "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}],\"quantityPerProducts\":[],\"validity\":{\"from\":\"2019-08-24T14:15:22Z\",\"till\":\"2019-08-24T14:15:22Z\"},\"loyaltyCardInfo\":null,\"productVisitors\":[{}]}]";
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/cross-sell");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"voucher\":\"string\",\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0,\"guideLanguage\":\"string\",\"formId\":\"126460ed-49b2-4c69-849a-bd8904ec5d8f\",\"visitors\":[{}],\"quantityPerProducts\":[],\"validity\":{\"from\":\"2019-08-24T14:15:22Z\",\"till\":\"2019-08-24T14:15:22Z\"},\"loyaltyCardInfo\":null,\"productVisitors\":[{}]}]"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("POST", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/cross-sell", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reservations": [
{
"id": 0,
"offerId": 0
}
]
}{
"errors": [{
"message": "string",
"code": "number"
}]
}
Update the Gift Aid consent flag on a basket. This is to record whether the customer has consented to Gift Aid for their purchase.
Request body
{
"enabled" : "boolean"
}
Success response code: 204 No content
{
"errors": [{
"message": "string",
"code": "number"
}]
}
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/giftaid");
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", "{\"enabled\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/giftaid")
.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("{\"enabled\":true}")
.asString();
const data = "{\"enabled\":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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/giftaid");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io/directsellingapi")
payload = "{\"enabled\":true}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("PUT", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/giftaid", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Eg: /forms/fields?language=en |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/fields")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/fields");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("GET", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"name": "firstName",
"type": "text",
"label":"First name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "First name must not exceed 50 characters",
"value": 50
}
]
},
{
"name": "lastName",
"type": "text",
"label": "Last name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Last name must not exceed 50 characters",
"value": 50
}
],
},
{
"name": "email",
"type": "email",
"label": "Email",
"sortOrder": "0",
"infoText": "Make sure this is correct so you'll receive your tickets.",
"validations": [
{
"type": "required",
"error": "Email address is required"
},
{
"type": "email",
"error": "Invalid email address"
},
{
"type": "maxlength",
"error": "Email address must not exceed 255 characters",
"value": 255
},
{
"type": "confirm",
"error": "Email address does not match"
}
]
},
{
"name": "address.country",
"type": "country",
"label": "Country",
"sortOrder": "0",
"infoText": "We need your country to determine your available payment methods.",
"items": [
{
"text": "Afghanistan",
"value": "AF"
},
{
"text": "Åland Islands",
"value": "AX"
},
{
"text": "Albania",
"value": "AL"
}
],
"validations": [
{
"type": "required",
"error": "Please select country"
}
]
}
]
{
"errors": [
{
"message": "string",
"code": 0
}
]
}Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The two-letter language code of the visitor. Eg: en |
bypass-ticket-distribution | boolean | false | Bypass the generation of the tickets and sending the order confirmed email. Default: false |
validateforms | boolean | false | Forms will be validated if set as true.(Default value is false.) |
In case language is not provided in the query, then the API will consider the language from the response body property $.language.
Request body (without dynamic checkout form):
{
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": "number",
"dateOfBirth": "date"
"reasonForVisit": "string"
"remarks": "string"
"emailOfFinanceDivision": "string"
"schoolName": "string"
"groupName": "string"
"ageRange": "string"
}
}
Request body (with dynamic checkout form):
{
"visitor": {
"<key>": "<value>"
},
"formIds": [string]
}
Parameter:
Parameter | Value |
|---|---|
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout");
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", "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24
\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout")
.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("{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
.asString();
const data = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}";
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/directsellingapi/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"
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", "/v4/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"amount": "number"
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to cancel. |
Success response code: 204 No Content
Possible errors
Code | Message |
|---|---|
1003 | <field> must be greater than 0. |
4004 | Order ID <field_identifier> is not valid. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/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);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v4/orders/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v4/orders/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to confirm. |
Name | Type | Required | Description |
|---|---|---|---|
sendemail | boolean | false | Indicates whether an email with the tickets should be sent to the visitor. Default value: False |
{
"payment": {
"amount": {
"currency": "string",
"value": "number"
},
"reference": "string",
"method": "string"
}
}
Success response code: 200 OK
Possible errors:
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field_name> must not exceed <field_max> characters. |
4004 | Order ID <field_identifier> is not valid. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/0/confirm");
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", "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0.1},\"reference\":\"string\",\"method\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/orders/0/confirm")
.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("{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0.1},\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0.1},\"reference\":\"string\",\"method\":\"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/directsellingapi/v4/orders/0/confirm");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0.1},\"reference\":\"string\",\"method\":\"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", "/v4/orders/0/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"order": {
"id": "number",
"number": "string",
"amount": "decimal"
},
"sale": {
"id": "number",
"creationDate": "date",
"amount": "decimal",
"salesPoint": {
"id": "number",
"name": "string"
},
"lines": [{
"id": "number",
"productId": "number",
"eventId": "number",
"timeSlotId": "number",
"unitPrice": "decimal",
"quantity": "number",
"amount": "decimal",
"creationDate": "date",
"orderLineId": "number",
"vatRate" : "number",
"barcodes": [{
"barcode": "string",
"creationDate": "date"
}]
}]
}
}{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The ISO 639-1 language code to be used for translatable data. Eg: /orders/56?language=fr |
Success response code: 200 OK
Extra information:
Some data can be found on different places depending on the type of offer (regular or group offer) that the order item is based on, for example, the productOrderLines property will only be filled for group offers.
The table below gives an overview of which data can be found in which property:
Data | Regular offers (per day/timeslot) | Group offers |
|---|---|---|
Order line identifier | orderItem.id | orderItem.productOrderLine.id |
Product unit price | orderItem.unitPrice | orderItem.productOrderLine.unitPrice |
Quantity* | orderItem.quantity | orderItem.productOrderLine.quantity |
Voucher pass | orderItem.voucherPass | orderItem.productOrderLine.voucherPass |
Voucher unit price | orderItem.voucherUnitPrice | orderItem.productOrderLine.voucherUnitPrice |
Visit date | orderItem.visitDate | orderItem.productOrderLine.visitDate |
Time slot | orderItem.timeSlot | orderItem.productOrderLine.timeSlot |
Product | orderItem.product | orderItem.productOrderLine.product |
Passes | orderItem.passes | orderItem.passes |
Groups | / | orderItem.groups |
* Quantity
The quantity mentioned in the table above has a different meaning based on the type of offer:
Regular offer: Quantity will contain the number of visitors.
Group offer:
per group tickets: Quantity will contain the number of groups.
per person tickets: Quantity will contain the number of visitors.
Use the property orderItem.offer.barcodeGenerationStrategy to know the kind of tickets for the group offer.
Parameters:
Parameter | Value/Description |
|---|---|
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
(orderItems) product | Only for 'regular' offers and 'group' offers with 'group tickets'. For other offer types, it will be null. NoteEither |
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
offertype |
|
frequencyType | 1 = Total 2 = PerDay 3 = PerSlot |
barcodeGenerationStrategy |
|
pricingStrategy |
|
groups | Only for group offers. |
orderItems |
|
productOrderLines | Applies to all group offers. For other offer types, it will be null. NoteEither |
linkedProducts | Only set for voucher offer products. |
(productOrderLines) id | orderline ID |
visitor | This parameter is optional. |
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
discountSources (type) | Eg:
|
discountSources(codes) | The list of applied discount codes for the promotion. It will be empty if the promotion does not use discount codes. |
channelType | 0 = Indirect 1 = Direct |
Possible errors:
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/orders/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/orders/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"status": 1,
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"language": "string",
"createdOn": "string",
"lastUpdatedOn": "string",
"referenceId": "string",
"orderItems": [
{
"id": 0,
"unitPrice": 0,
"vatRate": 0,
"quantity": 0,
"visitDate": "string",
"rebookingValidTill": "string",
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"timeSlot": {
"id": 0,
"start": "2026-07-30T11:59:39.428Z",
"end": "2026-07-30T11:59:39.428Z"
},
"offer": {
"id": 0,
"name": "string",
"imageUrl": "string",
"frequencyType": "string",
"offerType": "string",
"ticketOfferType": "string",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"eventId": 0,
"startDate": "2026-07-30T11:59:39.428Z",
"endDate": "2026-07-30T11:59:39.428Z"
},
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"groups": [
{
"numberOfVisitors": 0
}
],
"productOrderLines": [
{
"id": 0,
"unitPrice": 0,
"quantity": 0,
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0
},
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T11:59:39.428Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0
}
],
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T11:59:39.428Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0,
"offerReservationGroupId": 0
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"gender": 0,
"dateOfBirth": "2026-07-30T11:59:39.428Z",
"address": {
"country": "string",
"countryName": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"newsletterOptIn": true,
"groupName": "string",
"remarks": "string",
"reasonForVisit": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"ageRange": "string"
},
"hasPendingRebook": true,
"payLater": true,
"isGiftAidConsent": true,
"discount": {
"codes": [
"string"
],
"amount": 0
},
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
],
"salesPoint": {
"id": 0,
"channelType": 0,
"name": "string"
},
"customer": {
"id": 0,
"hasAccount": true
},
"crossSellRelationships": [
{
"mainOfferReservationGroupId": 0,
"crossSells": [
{
"offerReservationGroupId": 0,
"metadata": {
"required": true,
"quantityConstraint": "string"
}
}
]
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
number | String | true | The unique number of the order. Eg: /orders/number/D8893AB7CLOFA |
Name | Type | Required | Description |
|---|---|---|---|
language | String | false | The ISO 639-1 language code to be used for translatable data. Eg: /orders/number/D8893AB7CLOFA?language=fr |
Success response code: 200 OK
Parameters:
Parameter | Description |
|---|---|
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
product | Only for regular offers and group offers with group tickets. |
offertype |
|
frequencyType | 1 = Total 2 = PerDay 3 = PerSlot |
groups | Only for group offers. |
orderItems |
|
productOrderLines | Applies to all group offers. For other offer types, it will be null. NoteEither |
id (productOrderLines) | Orderline ID |
linkedProducts | Only set for voucher offer products. |
visitor | Optional |
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
type (discountSources) | Eg: Campaign or Promotion |
codes (discountSources) | The list of applied discount codes for this promotion. It is empty if the promotion does not use discount codes. |
Possible error codes:
Code | Message |
|---|---|
1001 |
Eg: number is required. |
1003 |
Eg: salespointid must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/number/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/orders/number/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/number/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/directsellingapi/v4/orders/number/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"status": 1,
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"language": "string",
"createdOn": "string",
"lastUpdatedOn": "string",
"referenceId": "string",
"orderItems": [
{
"id": 0,
"unitPrice": 0,
"vatRate": 0,
"quantity": 0,
"visitDate": "string",
"rebookingValidTill": "string",
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"timeSlot": {
"id": 0,
"start": "2026-07-30T12:01:37.028Z",
"end": "2026-07-30T12:01:37.028Z"
},
"offer": {
"id": 0,
"name": "string",
"imageUrl": "string",
"frequencyType": "string",
"offerType": "string",
"ticketOfferType": "string",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"eventId": 0,
"startDate": "2026-07-30T12:01:37.028Z",
"endDate": "2026-07-30T12:01:37.028Z"
},
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"groups": [
{
"numberOfVisitors": 0
}
],
"productOrderLines": [
{
"id": 0,
"unitPrice": 0,
"quantity": 0,
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0
},
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:01:37.028Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0
}
],
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:01:37.028Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0,
"offerReservationGroupId": 0
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"gender": 0,
"dateOfBirth": "2026-07-30T12:01:37.028Z",
"address": {
"country": "string",
"countryName": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"newsletterOptIn": true,
"groupName": "string",
"remarks": "string",
"reasonForVisit": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"ageRange": "string"
},
"hasPendingRebook": true,
"payLater": true,
"isGiftAidConsent": true,
"discount": {
"codes": [
"string"
],
"amount": 0
},
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
],
"salesPoint": {
"id": 0,
"channelType": 0,
"name": "string"
},
"customer": {
"id": 0,
"hasAccount": true
},
"crossSellRelationships": [
{
"mainOfferReservationGroupId": 0,
"crossSells": [
{
"offerReservationGroupId": 0,
"metadata": {
"required": true,
"quantityConstraint": "string"
}
}
]
}
]
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
{
"orderItems": [{
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number"
}]
}Success response code: 200 OK
The links are only available when the order status is 'PENDING' because changes are no longer supported for cancelled or confirmed orders.
Parameters:
Parameter | Value |
|---|---|
status |
|
(orderItems/productOrderLines) id | orderline ID |
(orderItems) product | Only for 'regular' offers and 'group' offers with 'group tickets'. |
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
(offer) type |
|
ticketType |
|
groups | Only for 'group' offers. |
orderItems |
|
productOrderLines | Applies to all group offers. For other offer types, it will be null. NoteEither |
visitor | This is optional. |
gender |
|
Possible error codes:
Code | Message |
|---|---|
1001 | <field_name> is required. |
1003 | <field_name> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/0/rebook");
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", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/orders/0/rebook")
.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("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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/directsellingapi/v4/orders/0/rebook");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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", "/v4/orders/0/rebook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"status": 1,
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"language": "string",
"createdOn": "string",
"lastUpdatedOn": "string",
"referenceId": "string",
"orderItems": [
{
"id": 0,
"unitPrice": 0,
"vatRate": 0,
"quantity": 0,
"visitDate": "string",
"rebookingValidTill": "string",
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"timeSlot": {
"id": 0,
"start": "2026-07-30T12:03:26.353Z",
"end": "2026-07-30T12:03:26.353Z"
},
"offer": {
"id": 0,
"name": "string",
"imageUrl": "string",
"frequencyType": "string",
"offerType": "string",
"ticketOfferType": "string",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"eventId": 0,
"startDate": "2026-07-30T12:03:26.353Z",
"endDate": "2026-07-30T12:03:26.353Z"
},
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"groups": [
{
"numberOfVisitors": 0
}
],
"productOrderLines": [
{
"id": 0,
"unitPrice": 0,
"quantity": 0,
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0
},
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:03:26.353Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0
}
],
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:03:26.353Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0,
"offerReservationGroupId": 0
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"gender": 0,
"dateOfBirth": "2026-07-30T12:03:26.353Z",
"address": {
"country": "string",
"countryName": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"newsletterOptIn": true,
"groupName": "string",
"remarks": "string",
"reasonForVisit": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"ageRange": "string"
},
"hasPendingRebook": true,
"payLater": true,
"isGiftAidConsent": true,
"discount": {
"codes": [
"string"
],
"amount": 0
},
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
],
"salesPoint": {
"id": 0,
"channelType": 0,
"name": "string"
},
"customer": {
"id": 0,
"hasAccount": true
},
"crossSellRelationships": [
{
"mainOfferReservationGroupId": 0,
"crossSells": [
{
"offerReservationGroupId": 0,
"metadata": {
"required": true,
"quantityConstraint": "string"
}
}
]
}
]
}[{
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number"
"errors": [{
"message": "string",
"code": "number"
}]
}]{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-ddTHH:mm:ssZ Example: fromdate=2022-01-01T00:00:00Z NoteThe date range (fromdate - todate) can not exceed the maximum of 31 days. All date and time data in the API request/response are passed in UTC-00:00 format. |
todate | date | true | The to date to fetch orders for. Format: yyyy-MM-ddTHH:mm:ssZ Example: todate=2022-01-31T23:59:59Z NoteThe date range (fromdate - todate) can not exceed the maximum of 31 days. All date and time data in the API request/response are passed in UTC-00:00 format. |
type | string | false | For Direct selling API version 3.2 only type=Rebook supported, if not provided then also it will return Rebook operations. Example: type=rebook |
Success response code: 200 OK
Possible error codes:
Code | Message |
|---|---|
1001 | field_name is required. |
1011 | The provided date range can not exceed more than 31 days. |
Parameters:
Parameter | Description |
|---|---|
id | Unique operation ID |
type | Rebook |
oldTimeslotId | Old timeslot ID |
timeslotId | New/rebooked timeslot ID |
timestamp | Rebooked date and time |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/operations");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/orders/operations")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/operations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/orders/operations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": 0,
"type": "string",
"orderId": 0,
"offerId": 0,
"oldTimeslotId": 0,
"timeslotId": 0,
"timestamp": "string"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The ID of the order. |
Name | Type | Required | Description |
|---|---|---|---|
paymentType | string | false | The defined type of payment to be created. It can be either of the two:
Default: DropIn |
expiresOn | date | false | The payment expiry date. If not set, then the default values will be used. The maximum custom expiry for a payment of type 'PayByLink' is 14 days. The maximum custom expiry for a payment of type 'DropIn' is 30 minutes. |
returnUri | string | false | The URL to return to after the payment concludes. This is only applicable for payments of type 'DropIn' |
postbackUri | string | false | The URL to be called with status updates of the payment (completed, failed, refunded …). More information on how to handle postbacks for payments can be found in the Payment API documentation. |
{
"paymentType": "string",
"expiresOn": "date",
"returnUri": "string"
}
When payment for the order is needed
Success response code: 200 OK
When the order is in a state where a payment won't be needed
Success response code: 204 NoContent
Example: An order is in a 'Confirmed' state. That means that the order has no payment or that its payment is already finalised, therefore, NoContent.
Response body on success: No response body
The error response code 422 Unprocessable Entity will be returned if the order has no visitor information associated with it, and thus, insufficient information is present to create a payment.
Parameters:
Parameter | Description |
|---|---|
paymentSession | This is optional. |
paymentLink | This is optional. |
expiresOn | This is optional and is empty for a free payment. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/0/payment");
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", "{\"paymentType\":\"string\",\"expiresOn\":\"2019-08-24T14:15:22Z\",\"returnUri\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/orders/0/payment")
.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("{\"paymentType\":\"string\",\"expiresOn\":\"2019-08-24T14:15:22Z\",\"returnUri\":\"string\"}")
.asString();
const data = "{\"paymentType\":\"string\",\"expiresOn\":\"2019-08-24T14:15:22Z\",\"returnUri\":\"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/directsellingapi/v4/orders/0/payment");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"paymentType\":\"string\",\"expiresOn\":\"2019-08-24T14:15:22Z\",\"returnUri\":\"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", "/v4/orders/0/payment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"reference": "string",
"paymentSession": "string",
"paymentLink": "string",
"expiresOn": "date",
"amount": "number"
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The language code in which the pass details should be returned. Default: en Eg: language=nl |
Success response code: 200 OK
Parameters:
Parameter | Value/Description |
|---|---|
status |
|
format |
|
link | Only if the status is 'Generated'. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/0/passes/link");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/orders/0/passes/link")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/0/passes/link");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/orders/0/passes/link", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"status": "string",
"format": "string",
"link": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Operation limitation
This endpoint is currently only supported for un-guided, non-group offers. Attempting to call the endpoint with unsupported items will cause an HTTP 422 Unprocessable Entity error response.
Rebook expiration
The rebook will expire in 48 hours after being created, unless it is confirmed (paid) within that time. This is done in order to release the double-booked capacity.The capacity on the rebooked slots will be released, similar to cancelled or expired reservations.
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderItems":[
{
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number",
"CurrentVisitDate": "datetime",
"NewVisitDate": "datetime",
"passIds":[
"string"
], // Optional
"groupVisitorQuantityPerPassId":[
"number"
]
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
PassIds | string array | false | PassIds are the same as barcodes present in sales data (returned on order confirmation) Eg: EOPF2D3438D8XD8S, EOUI2IL035M9QKZ6, EOZX2KW6379220EI If present, the system will rebook only the tickets specified in the given offer. If omitted, all tickets of the given offer will be rebooked. |
CurrentTimeSlotId | number | false | The time slot for which the passes are currently ordered. This property is required if the offer is of the capacity type 'PerSlot' (See Get offer detail response property |
NewTimeSlotId | number | false | The time slot to which the passes should be moved to. This property is required if the offer is of the capacity type 'PerSlot' (See Get offer detail response property |
CurrentVisitDate | date | false | The date for which the passes are currently ordered. This property is required if the offer is of the capacity type 'PerDay' (See Get offer detail response property |
NewVisitDate | date | false | The date to which the passes should be moved to. This property is required if the offer is of the capacity type 'PerDay' (See Get offer detail response property |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/string/rebook/initiate");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-visitor-token", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/string/rebook/initiate")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[]}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[]}]}";
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/directsellingapi/v4/visitor/orders/string/rebook/initiate");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[]}]}"
headers = {
'Accept': "application/json",
'origin': "string",
'x-visitor-token': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/orders/string/rebook/initiate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"paymentAmount": "decimal",
"expiresOn": "datetime"
}
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Response body on error (422 HTTP Status Code):
{
"errors": [
{
"code": 0,
"message": "string",
"offerId": 0,
"currentTimeSlotId": 0,
"newTimeSlotId": 0,
"currentVisitDate": "2026-07-30T12:10:13.503Z",
"newVisitDate": "2026-07-30T12:10:13.503Z"
}
]
}Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"payment":{
"Amount": "number",
"Currency": "string",
"Reference": "string",
"Method": "string"
}
}
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/confirm");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/confirm")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.body("{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = "{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"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/directsellingapi/v4/orders/string/rebook/confirm");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}"
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/orders/string/rebook/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/cancel");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/cancel")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/string/rebook/cancel");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/orders/string/rebook/cancel", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderItems":[
{
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number",
"CurrentVisitDate": "datetime",
"NewVisitDate": "datetime",
"passIds":[
"string"
],
"groupVisitorQuantityPerPassId":[
"number"
]
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
PassIds | string array | false | PassIds are the same as barcodes present in sales data (returned on order confirmation - see Get order detail) Eg: EOPF2D3438D8XD8S, EOUI2IL035M9QKZ6, EOZX2KW6379220EI If present, the system will rebook only the tickets specified in the given offer. If omitted, all tickets of the given offer will be rebooked. |
CurrentTimeSlotId | number | false | The time slot for which the passes are currently ordered. This property is required if the offer is of the capacity type 'PerSlot' (See Get offer detail response property |
NewTimeSlotId | number | false | The time slot to which the passes should be moved to. This property is required if the offer is of the capacity type 'PerSlot' (See Get offer detail response property |
CurrentVisitDate | date | false | The date for which the passes are currently ordered. This property is required if the offer is of capacity type 'PerDay' (See Get offer detail response property |
NewVisitDate | date | false | The date to which the passes should be moved to. This property is required if the offer is of capacity type 'PerDay' (See Get offer detail response property |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/calculate-payment-amount");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/orders/string/rebook/calculate-payment-amount")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}";
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/directsellingapi/v4/orders/string/rebook/calculate-payment-amount");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}"
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/orders/string/rebook/calculate-payment-amount", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"paymentAmount": "decimal"
}
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderLines":[
{
"id": "number",
"quantity": "number"
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
id | number | true | This is the id of the orderline in your order. |
quantity | number | true | This represents the quantity to which the order line will be updated. For group tickets, you can combine all groups, and new groups will be recalculated accordingly. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderLines\":[{\"id\":0,\"quantity\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.patch("https://api.staging-enviso.io/directsellingapi/v4/orders/string")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderLines\":[{\"id\":0,\"quantity\":0}]}")
.asString();
const data = "{\"orderLines\":[{\"id\":0,\"quantity\":0}]}";
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://api.staging-enviso.io/directsellingapi/v4/orders/string");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
payload = "{\"orderLines\":[{\"id\":0,\"quantity\":0}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("PATCH", "/directsellingapi/v4/orders/string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderLines":[
{
"id": "number",
"quantity": "number"
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
id | number | true | This is the id of the orderline in your order. |
quantity | number | true | This represents the quantity to which the order line will be updated. For group tickets, you can combine all groups, and new groups will be recalculated accordingly. |
Success response code: 200 OK
Parameters:
Parameter | Description |
|---|---|
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
product (orderItems) | Only for 'regular' offers and 'group' offers with 'group tickets'. |
offertype |
|
frequencyType | 1 = Total 2 = PerDay 3 = PerSlot |
groups | Only for 'group' offers. |
orderItems |
|
productOrderLines | Applies to all group offers. For other offer types, it will be null. NoteEither |
id (productOrderLines) | orderline ID |
linkedProducts | Only set for voucher offer products. |
visitor | Optional |
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
type (discountSources) | Eg: "Campaign" or "Promotion" |
codes (discountSources) | The list of applied discount codes of this promotion. Empty if the promotion does not use discount codes. |
Extra information about the response can be found in Get order detail.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string/calculate");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json-patch+json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderLines\":[{\"id\":0,\"quantity\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/orders/string/calculate")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderLines\":[{\"id\":0,\"quantity\":0}]}")
.asString();
const data = "{\"orderLines\":[{\"id\":0,\"quantity\":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/directsellingapi/v4/orders/string/calculate");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
payload = "{\"orderLines\":[{\"id\":0,\"quantity\":0}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/directsellingapi/v4/orders/string/calculate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"status": 1,
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"language": "string",
"createdOn": "string",
"lastUpdatedOn": "string",
"referenceId": "string",
"orderItems": [
{
"id": 0,
"unitPrice": 0,
"vatRate": 0,
"quantity": 0,
"visitDate": "string",
"rebookingValidTill": "string",
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"timeSlot": {
"id": 0,
"start": "2026-07-30T12:11:37.097Z",
"end": "2026-07-30T12:11:37.097Z"
},
"offer": {
"id": 0,
"name": "string",
"imageUrl": "string",
"frequencyType": "string",
"offerType": "string",
"ticketOfferType": "string",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"eventId": 0,
"startDate": "2026-07-30T12:11:37.097Z",
"endDate": "2026-07-30T12:11:37.097Z"
},
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"groups": [
{
"numberOfVisitors": 0
}
],
"productOrderLines": [
{
"id": 0,
"unitPrice": 0,
"quantity": 0,
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0
},
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:11:37.097Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0
}
],
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:11:37.097Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0,
"offerReservationGroupId": 0
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"gender": 0,
"dateOfBirth": "2026-07-30T12:11:37.097Z",
"address": {
"country": "string",
"countryName": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"newsletterOptIn": true,
"groupName": "string",
"remarks": "string",
"reasonForVisit": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"ageRange": "string"
},
"hasPendingRebook": true,
"payLater": true,
"isGiftAidConsent": true,
"discount": {
"codes": [
"string"
],
"amount": 0
},
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
],
"salesPoint": {
"id": 0,
"channelType": 0,
"name": "string"
},
"customer": {
"id": 0,
"hasAccount": true
},
"crossSellRelationships": [
{
"mainOfferReservationGroupId": 0,
"crossSells": [
{
"offerReservationGroupId": 0,
"metadata": {
"required": true,
"quantityConstraint": "string"
}
}
]
}
]
}{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149/outstanding-payment |
Success response code: 200 OK
204 No content is returned if an outstanding payment is not applicable to the order. Applicable only for reserved orders and confirmed orders with a pending rebook.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/orders/string/outstanding-payment");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/orders/string/outstanding-payment")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/orders/string/outstanding-payment");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/directsellingapi/v4/orders/string/outstanding-payment", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"amount": "decimal"
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Default: en |
includePerTicketFields | boolean | false | Display formfields for per-ticket forms. Default: true |
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get more detailed information about the offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/forms/default/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/forms/default/fields")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/forms/default/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/forms/default/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"name": "firstName",
"type": "text",
"label": "First name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "First name must not exceed 50 characters",
"value": 50
}
]
"perTicket": false
},
{
"name": "lastName",
"type": "text",
"label": "Last name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Last name must not exceed 50 characters",
"value": 50
}
],
"perTicket": false
},
{
"name": "email",
"type": "email",
"label": "Email",
"sortOrder": "0",
"infoText": "Make sure this is correct so you'll receive your tickets.",
"validations": [
{
"type": "required",
"error": "Email address is required"
},
{
"type": "email",
"error": "Invalid email address"
},
{
"type": "maxlength",
"error": "Email address must not exceed 255 characters",
"value": 255
},
{
"type": "confirm",
"error": "Email address does not match"
}
],
"perTicket": true
},
{
"name": "address.country",
"type": "country",
"label": "Country",
"sortOrder": "0",
"infoText": "We need your country to determine your available payment methods.",
"items": [
{
"text": "Afghanistan",
"value": "AF"
},
{
"text": "Åland Islands",
"value": "AX"
},
{
"text": "Albania",
"value": "AL"
}
],
"validations": [
{
"type": "required",
"error": "Please select country"
}
],
"perTicket": false
}
]
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the form. Eg: /offers/07c632c6-7e3b-4eca-b6bf-e8c792b0fc2f/fields |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Eg: /07c632c6-7e3b-4eca-b6bf-e8c792b0fc2f/fields?language=en |
includePerTicketFields | boolean | false | Display formfields for per-ticket forms. Eg: /07c632c6-7e3b-4eca-b6bf-e8c792b0fc2f/fields?includePerTicketFields=false |
Success response code: 200 OK
Link relationship type:
Relationship | Description | URL |
|---|---|---|
item | Get formid linked with an offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/forms/string/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/forms/string/fields")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/forms/string/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/forms/string/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"name": "schoolName",
"type": "text",
"label": "School name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "School name must not exceed 300 characters",
"value": 300
}
],
"perTicket": false
},
{
"name": "firstName",
"type": "text",
"label": "First name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "First name must not exceed 50 characters",
"value": 50
}
],
"perTicket": false
},
{
"name": "lastName",
"type": "text",
"label": "Last name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Last name must not exceed 50 characters",
"value": 50
}
],
"perTicket": false
},
{
"name": "email",
"type": "email",
"label": "Email",
"sortOrder": "0",
"infoText": "Make sure this is correct so you'll receive your tickets.",
"validations": [
{
"type": "required",
"error": "Email address is required"
},
{
"type": "email",
"error": "Invalid email address"
},
{
"type": "maxlength",
"error": "Email address must not exceed 255 characters",
"value": 255
},
{
"type": "confirm",
"error": "Email address does not match"
}
],
"perTicket": true
},
{
"name": "address.country",
"type": "country",
"label": "Country",
"sortOrder": "0",
"infoText": "We need your country to determine your available payment methods.",
"items": [
{
"text": "Afghanistan",
"value": "AF"
},
{
"text": "Åland Islands",
"value": "AX"
},
{
"text": "Albania",
"value": "AL"
},
{
"text": "Algeria",
"value": "DZ"
}],
"validations": [
{
"type": "required",
"error": "Please select country"
}
],
"perTicket": false
},
{
"name": "emailOfFinanceDivision",
"type": "email",
"label": "Email of finance division",
"sortOrder": "0",
"validations": [
{
"type": "email",
"error": "Invalid email address"
},
{
"type": "maxlength",
"error": "Email address must not exceed 255 characters",
"value": 255
}
],
"perTicket": false
},
{
"name": "phone",
"type": "phone",
"label": "Phone",
"sortOrder": "0",
"validations": [
{
"type": "phone",
"error": "Invalid phone number"
}
],
"perTicket": true
},
{
"name": "address.number",
"type": "text",
"label": "House number",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "House number must not exceed 50 characters",
"value": 50
}
],
"perTicket": false
},
{
"name": "address.street",
"type": "text",
"label": "Street name",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Street name must not exceed 300 characters",
"value": 300
}
],
"perTicket": false
},
{
"name": "address.city",
"type": "text",
"label": "City",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "City name must not exceed 50 character",
"value": 50
}
],
"perTicket": false
},
{
"name": "address.postalCode",
"type": "text",
"label": "Postal code",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Postal code must not exceed 20 characters",
"value": 20
}
]
"perTicket": false
},
{
"name": "reasonForVisit",
"type": "textarea",
"label": "Reason for visit",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Reason for visit must not exceed 300 characters",
"value": 300
}
]
"perTicket": true
},
{
"name": "remarks",
"type": "textarea",
"label": "Remarks",
"sortOrder": "0",
"validations": [
{
"type": "maxlength",
"error": "Remarks must not exceed 300 characters",
"value": 300
}
],
"perTicket": false
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 200 OK
Response parameters:
Parameter | Description |
|---|---|
isoCode | The official ISO-4217 three-letter ("Alpha-3") currency code. Eg: EUR |
symbol | Eg: € |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/venues/self");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/venues/self")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/venues/self");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/venues/self", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"description": "string",
"logoImageUrl": "string",
"address": {
"addressLine1": "string",
"addressLine2": "string",
"locality": "string",
"postalCode": "string",
"country": "string"
},
"googleLocation": {
"latitude": "decimal",
"longitude": "decimal"
},
"website": "string",
"facebook": "string",
"twitter": "string",
"X": "string",
"linkedin": "string",
"coverImageUrl": "string",
"currency": {
"isoCode": "string",
"symbol": "string",
"format": "string"
}
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate | datetime | false | Filter sales using from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2021-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | datetime | false | Filter sales using the end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2021-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
page | number | false | The start page number for the range to show in the result set. If omitted, the first page of the results will be returned. Default: 0 (=first page) Note
NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. |
perpage | number | false | The number of results per page. If omitted, the default page size will be used. Default: 50 Note
|
only-include-product-sales-lines | boolean | false | Whether or not to return all sales-lines or only the product sales-lines of the sales. Default: true Eg: only-include-product-sales-lines=true NoteThe default value is true therefore it does not break any integrations. However, integrators should set this to false immediately. The 'SaleType' enum property should be handled in the saleDto. |
skiprebook | boolean | false | Whether or not to skip rebook sales. Default: true NoteThe default value is true therefore it does not break any integrations. However, integrators should set this to false immediately. The 'SaleType' enum property should be handled in the saleDto. |
include-passes | boolean | false | Whether or not to include the passes. Default: true |
Success response code: 200 OK
Enum values:
Property | Value |
|---|---|
salesType | 0 = Order confirmed 1 = Cancellation 2 = Rebook |
salesLineType | 0 = Product 1 = Service fee 2 = Voucher discount |
salesChannelType | 1 = Online 2 = Onsite 3 = Reseller 4 = B2B |
channelType | 0 = Indirect 1 = Direct |
offerType |
|
voucherPassId | This will only be filled for sales lines linked to a voucher redemption. |
MembershipHolder | This will only present in case of membership offers. |
customerRelationId | This will only present in case the holder is a relation of the customer, otherwise the holder is the customerId. |
Validity will be null for the following offers:
Ticket offer with Total frequency and Unlimited period, the validTill will be null.
Membership offer with a fixed period validity, starting from the first visit.
Voucher offer where voucher validity is not defined.
Possible error codes:
Code | Message |
|---|---|
1004 |
|
1012 |
Eg: perpage must be between 1 and 50. |
9023 | The provided value for Eg: The provided value for fromdate must be passed in yyyy-MM-ddTHH:mm:ssZ format. |
9024 | From date must be less than To date. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/sales");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/sales")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/sales");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/sales", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"saleType": 0,
"externalId": "string",
"orderNumber": "string",
"payment": {
"method": "string",
"reference": "string"
},
"discount": {
"code": "string",
"codes": [
"string"
],
"amount": 0
},
"cancellationFee": 0,
"salesLines": [
{
"discountAmount": 0,
"barcodes": [
{
"id": 0,
"barcode": "string",
"externalCode": "string",
"scanned": true,
"valid": true,
"numberOfVisitors": 0,
"validFrom": "2026-07-30T12:13:21.800Z",
"validTill": "2026-07-30T12:13:21.800Z",
"createdOn": "2026-07-30T12:13:21.800Z",
"visitorData": "string",
"discount": {
"amount": 0,
"discountSources": [
{
"type": "string",
"name": "string",
"codes": [
"string"
],
"brandName": "string",
"cardNumber": "string"
}
]
},
"validityPeriod": {
"from": "string",
"till": "string"
}
}
],
"visitDate": "2026-07-30T12:13:21.800Z",
"vatRateId": 0,
"vatRate": 0,
"ledgerAccount": {
"name": "string",
"number": "string"
},
"productGroup": {
"id": 0,
"name": "string",
"code": "string"
},
"voucherPassId": "string",
"isGiftAid": true,
"membershipHolder": {
"customerId": 0,
"customerRelationId": 0
},
"id": 0,
"productId": 0,
"productName": "string",
"eventId": 0,
"offerId": 0,
"offerName": "string",
"timeSlotId": 0,
"unitPrice": 0,
"quantity": 0,
"amount": 0,
"createdOn": "2026-07-30T12:13:21.800Z",
"orderLineId": 0,
"commissionType": 0,
"commissionRate": 0,
"commissionAmount": 0,
"salesLineType": 0,
"offerType": "string"
}
],
"cost": 0,
"visitorData": "string",
"poNumber": "string",
"customer": {
"id": 0,
"hasAccount": true
},
"id": 0,
"createdOn": "2026-07-30T12:13:21.800Z",
"amount": 0,
"salesChannelType": 0,
"partner": {
"id": 0,
"name": "string",
"profileName": "string",
"logoImageUrl": "string"
},
"salesPoint": {
"id": 0,
"name": "string",
"channelType": 0
},
"orderId": 0,
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
}
}
]{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the sale. |
Name | Type | Required | Description |
|---|---|---|---|
only-include-product-sales-lines | boolean | false | Whether or not to return all sales-lines or only the product sales-lines of the sales. The default value is 'true', so that we do not break any integrations. However, integrators should set the value to 'false' immediately. They should handle the added Default: true Eg: only-include-product-sales-lines=true |
Success response code: 200 OK
Enum values:
Property | Value |
|---|---|
salesChannelType | 1 = Online 2 = Onsite 3 = Reseller 4 = B2B |
validFrom/validTill | Validity will be null for the following offers:
|
channelType | 0 = Indirect 1 = Direct |
offerType |
|
voucherPassId | This will only be filled for sales lines linked to a voucher redemption. |
MembershipHolder | This will only present in case of membership offers. |
customerRelationId | This will only present in case the holder is a relation of the customer, otherwise the holder is the customerId. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/sales/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/sales/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/sales/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/sales/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"saleType": 0,
"externalId": "string",
"orderNumber": "string",
"payment": {
"method": "string",
"reference": "string"
},
"discount": {
"code": "string",
"codes": [
"string"
],
"amount": 0
},
"cancellationFee": 0,
"salesLines": [
{
"discountAmount": 0,
"barcodes": [
{
"id": 0,
"barcode": "string",
"externalCode": "string",
"scanned": true,
"valid": true,
"numberOfVisitors": 0,
"validFrom": "2026-07-30T12:14:05.819Z",
"validTill": "2026-07-30T12:14:05.819Z",
"createdOn": "2026-07-30T12:14:05.819Z",
"visitorData": "string",
"discount": {
"amount": 0,
"discountSources": [
{
"type": "string",
"name": "string",
"codes": [
"string"
],
"brandName": "string",
"cardNumber": "string"
}
]
},
"validityPeriod": {
"from": "string",
"till": "string"
}
}
],
"visitDate": "2026-07-30T12:14:05.819Z",
"vatRateId": 0,
"vatRate": 0,
"ledgerAccount": {
"name": "string",
"number": "string"
},
"productGroup": {
"id": 0,
"name": "string",
"code": "string"
},
"voucherPassId": "string",
"isGiftAid": true,
"membershipHolder": {
"customerId": 0,
"customerRelationId": 0
},
"id": 0,
"productId": 0,
"productName": "string",
"eventId": 0,
"offerId": 0,
"offerName": "string",
"timeSlotId": 0,
"unitPrice": 0,
"quantity": 0,
"amount": 0,
"createdOn": "2026-07-30T12:14:05.819Z",
"orderLineId": 0,
"commissionType": 0,
"commissionRate": 0,
"commissionAmount": 0,
"salesLineType": 0,
"offerType": "string"
}
],
"cost": 0,
"visitorData": "string",
"poNumber": "string",
"customer": {
"id": 0,
"hasAccount": true
},
"id": 0,
"createdOn": "2026-07-30T12:14:05.819Z",
"amount": 0,
"salesChannelType": 0,
"partner": {
"id": 0,
"name": "string",
"profileName": "string",
"logoImageUrl": "string"
},
"salesPoint": {
"id": 0,
"name": "string",
"channelType": 0
},
"orderId": 0,
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
}
}{
"errors": [{
"message": "string",
"code": "number"
}]
}
Request headers:
An additional request header called x-visitor-token is required. This should contain the JWT acquired using the Enviso Authentication API documentation (/v4/visitor/exchange-token).
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the visitor. Eg: /visitor/21/activate |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/0/activate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/0/activate")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/relations/0/activate");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/relations/0/activate", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the visitor. Eg: /visitor/21/deactivate |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/0/deactivate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/0/deactivate")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/relations/0/deactivate");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/relations/0/deactivate", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The unique identifier of the basket that contains the membership to be assigned. Eg: id=6B29FC40-CA47-1067-D41D-00DD020662BA |
reservationid | number | true | The unique identifier of the reservation that contains the membership to be assigned. Eg: reservationid=236 |
Name | Type | Required | Description |
|---|---|---|---|
relationid | number | false | The unique identifier of the visitor's relation. Default: null Eg: relationid=639 |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0/assignholder");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0/assignholder")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0/assignholder");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reservations/0/assignholder", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": 0
}
]
}
Success response code: 200 OK
imageURL: The link provided is a CDN link. It is publicly accessible and does not require authentication.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/memberships");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/memberships")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/memberships");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/memberships", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"name": "string",
"productName": "string",
"membershipHolderName": "string",
"validFrom": "date",
"validTill": "date",
"imageUrl": "string",
"orderId": "number"
}]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
This endpoint is obsolete. Please refer to the response parameter imageURL in the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
offerid | number | true | The unique identifier of the offer. Eg: /visitor/offers/123/images/912aa510-c595-4fca-97cd-319f7ff7dff1.jpeg |
imagekey | string | true | The unique identifier of the offer image. Eg: /visitor/offers/123/images/912aa510-c595-4fca-97cd-319f7ff7dff1.jpeg |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/offers/0/images/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "image/png");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/offers/0/images/string")
.header("Accept", "image/png")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/offers/0/images/string");
xhr.setRequestHeader("Accept", "image/png");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "image/png",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate & todate | date | false | The from date to fetch orders for. Format: yyyy-MM-ddTHH:mm:ssZ
NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
visitfromdate & visittodate | date | false | The from date of the visit of the orders you would like to receive. Format: yyyy-MM-ddTHH:mm:ssZ
NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
page | integer | false | The page of the order-list you want to receive. Eg: page=1 NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. Note
|
perpage | integer | false | The number of orders to receive per page. Default value: 50 Eg: perpage=25 Note
|
searchfieldname | string | false | A string that is used to query results containing the given string in at least one of the following fields:
Eg: searchfieldname=ordernumber |
searchfieldvalue | string | false | A string that is used to query the actual result within the Eg: searchfieldvalue =E63QISYD455XP |
orderby | string | false | A string to sort the orders. You can sort by the field After the given sort field, you can specify the direction as either Default: ASC Eg: orderby=lastupdatedon DESC |
status | number | false | The number used to filter visitor orders on status. 1 = Confirmed 2 = Cancelled 3 = Reserved Note
Eg: status=1 |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/orders", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"status": "number",
"id": "number",
"number": "string",
"amount": "number",
"createdOn": "date",
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"salesPointId": "number",
"isRefundable": "boolean",
"hasPendingRebook": "boolean"
}
]
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/56/ |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The ISO 639-1 language code to be used for translatable data. Eg: /orders/56?language=fr |
Success response code: 200 OK
Parameters:
Parameter | Value |
|---|---|
barcodeGenerationStrategy |
|
pricingStrategy |
|
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/orders/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"createdOn": "date",
"orderItems": [
{
"id": "number",
"offerReservationGroupId": "number",
"unitPrice": "number",
"vatRate": "number",
"quantity": "number",
"totalPrice": "number",
"visitDate": "string",
"rebookingValidTill": "date",
"timeSlotId": "number",
"startTime": "string",
"endTime": "string",
"product": {
"offer": {
"type": "number",
"offerType": "number",
"frequencyType": "number",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"id": "number",
"eventId": "number",
"name": "string",
"description": "string",
"imageUrl": "string",
"culture": "string",
"venue": {
"id": "number",
"name": "string",
"profileName": "string",
"addressLine1": "string",
"addressLine2": "string",
"country": "string",
"locality": "string",
"postalcode": "string",
"locale": {
"culture": "string",
"timezoneId": "string",
"currencySymbol": "string",
"isoCurrencySymbol": "string",
"timeZoneOffset": "string"
}
},
"startDate": "date",
"endDate": "date"
},
"id": "number",
"name": "string",
"price": "number",
"productId": "number"
},
"guideLanguage": "string",
"ticketBarcodes": [
{
"barcodeFormat": "string",
"barcodeString": "string",
"barcode": "string",
"creationDate": "date",
"isScanned": "boolean"
}
],
"amount": "number",
"visitorGroups": [
{
"numberOfVisitors": "number"
}
],
"validFrom": "date",
"validTill": "date",
"isRebookable": "boolean",
"isCancelable": "boolean",
"voucherPassId": "string",
"voucherUnitPrice": "number"
}
],
"payment": {
"method": "string",
"otherMethodName": "string",
"amount": {
"currency": "string",
"value": "number"
},
"referenceId": "string",
"isRefundable": "boolean"
},
"hasPendingRebook": "boolean",
"isGiftAidConsent": "boolean",
"status": "number",
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"crossSellRelationships": [{
"mainOfferReservationGroupId": "number",
"crossSells": [{
"offerReservationGroupId": "number",
"metadata": {
"required": "boolean",
"quantityConstraint": "string"
}
}]
}]
}
{
"errors": [
{
"message": "string",
"trace": "string"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The two-letter language code of the visitor Eg: en |
An additional request header called x-visitor-token is required. This should contain the JWT acquired using the Enviso Authentication API ( /v1/visitor/exchange-token ).
Further documentation on how to obtain this JWT can be found in the Enviso Authentication API documentation.
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Request body (without dynamic checkout form):
{
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": "number",
"dateOfBirth": "date"
"reasonForVisit": "string"
"remarks": "string"
"emailOfFinanceDivision": "string"
"schoolName": "string"
"groupName": "string"
"ageRange": "string"
}
}Enum value:
Parameter | Value |
|---|---|
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
Request body (with dynamic checkout form):
{
"visitor": {
"<key>": "<value>"
},
"formIds": [string]
}Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
.asString();
const data = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}";
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/directsellingapi/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"amount": "decimal"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
When a visitor cancel an order containing required cross-sell items or cross-sell items with product limitation configurations, these conditions are not validated during the cancellation process.
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/56 |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID which is linked with the order. Eg: salespointid=21 |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/cancel");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/cancel")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders/0/cancel");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/orders/0/cancel", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/28149 |
Name | Type | Required | Description |
|---|---|---|---|
language | string | true | The language code in which the pass details should be returned. Default: en Eg: language=nl |
Success response code: 200 OK
Enum values
Property | Value/Description |
|---|---|
status |
|
format |
|
link | Only if the status is 'Generated'. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/passes/link");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/passes/link")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders/0/passes/link");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/orders/0/passes/link", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"status": "Pending",
"format": "Pdf",
"link": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
When a visitor rebook an order containing required cross-sell items or cross-sell items with product limitation configurations, these conditions are not validated during the rebooking process.
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
{
"orderItems": [
{
"offerId": 0,
"currentTimeSlotId": 0,
"newTimeSlotId": 0
}
]
}
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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/directsellingapi/v4/visitor/orders/0/rebook");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/orders/0/rebook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Success response code: 200 OK
Enum value:
Property | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/relations");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/relations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"customerId": "number",
"type": "string",
"firstName": "string",
"lastName": "string",
"active": "boolean",
"birthDate": "date",
"pictureUrl": "string"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
{
"firstName": "string",
"lastName": "string",
"type": "string",
"birthDate": "date",
"newPictureData": "string"
}
Success response code: 200 OK
Enum value:
Property | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}")
.asString();
const data = "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"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/directsellingapi/v4/visitor/relations");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/relations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"customerId": 0,
"type": "Other",
"firstName": "string",
"lastName": "string",
"active": true,
"birthDate": "2024-04-03T08:19:06.261Z",
"pictureKey": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the relation. Eg: /visitor/relations/56 |
{
"firstName": "string",
"lastName": "string",
"type": "string",
"birthDate": "date",
"newPictureData": "string",
"removePicture": "boolean"
}
Success response code: 204 No Content
Enum value:
Property | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/relations/0")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}")
.asString();
const data = "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":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/directsellingapi/v4/visitor/relations/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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/relations/0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/userprofile");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/userprofile")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/userprofile");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/userprofile", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"firstName": "string",
"lastName": "string",
"email": "string",
"language": "string",
"country": "string",
"pictureUrl": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
{
"firstName": "string",
"lastName": "string",
"email": "string",
"language": "string",
"country": "string",
"newPictureData": "string",
"removePicture": true
}
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/userprofile");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/userprofile")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}")
.asString();
const data = "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":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/directsellingapi/v4/visitor/userprofile");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/userprofile", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
{
"orderItems": [
{
"offerId": 0,
"currentTimeSlotId": 0,
"newTimeSlotId": 0,
"currentVisitDate": "2019-08-24T14:15:22Z",
"newVisitDate": "2019-08-24T14:15:22Z",
"passIds": [],
"groupVisitorQuantityPerPassId": []
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
PassIds | string array | false |
Eg: EOPF2D3438D8XD8S, EOUI2IL035M9QKZ6, EOZX2KW6379220EI
|
CurrentTimeSlotId | number | false | The timeslot where the passes are currently ordered on. NoteThis property is required if the offer capacity type is PerSlot, otherwise it should be omitted. |
NewTimeSlotId | number | false | The timeslot where the passes should be moved to. NoteThis property is required if the offer capacity type is PerSlot, otherwise it should be omitted. |
CurrentVisitDate | number | false | The date where the passes are currently ordered on. NoteThis property is required if the offer capacity type is PerDay, otherwise it should be omitted. |
NewVisitDate | number | false | The date where the passes should be moved to. NoteThis property is required if the offer capacity type is PerDay, otherwise it should be omitted. |
Success response code: 200 OK
Response parameters
Parameter | Description |
|---|---|
offerId | This is an optional parameter. |
currentTimeSlotId | This is an optional parameter. |
newTimeSlotId | This is an optional parameter. |
currentVisitDate | This is an optional parameter. |
newVisitDate | This is an optional parameter. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/initiate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/initiate")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}";
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/directsellingapi/v4/visitor/orders/0/rebook/initiate");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"currentVisitDate\":\"2019-08-24T14:15:22Z\",\"newVisitDate\":\"2019-08-24T14:15:22Z\",\"passIds\":[],\"groupVisitorQuantityPerPassId\":[]}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/orders/0/rebook/initiate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"paymentAmount": "decimal",
"expiresOn": "date"
}
{
"errors": [{
"message": "string",
"code": "number",
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number"
"currentVisitDate": "date",
"newVisitDate": "date",
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/confirm");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/confirm")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = "{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"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/directsellingapi/v4/visitor/orders/0/rebook/confirm");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":0.1,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/orders/0/rebook/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/cancel");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/rebook/cancel")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders/0/rebook/cancel");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v4/visitor/orders/0/rebook/cancel", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
scanned | bool | false | Possible values are:
Eg: scanned=true |
page | number | false | The page of the passes you want to receive. Default: 0 Eg: page=2 NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. |
fromdate | date | true | Filter offer from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2023-09-01T00:00:00Z |
todate | date | true | Filter offer end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2023-09-31T23:59:59Z NoteThe date range can be a maximum of 13 months. |
perpage | number | false | The number of passes you want to receive per page. Default: 50 Eg: perpage=10 |
passtype | string | false | The type of passes you want to receive. Possible values are:
Eg: passtype=ticket |
language | string | false | The language code in which the pass details should be returned. Default: en Eg: language=en |
Success response code: 200 OK
Response parameters:
Parameter | Description |
|---|---|
isCancelled | Returns true if the pass is cancelled; otherwise, returns false. |
passType | Either Ticket, Membership or Voucher |
validity | Shows pass validity. |
dateOfFirstVisit | If the pass has been scanned, the scanned date is returned; otherwise, null. |
visitorData | Visitor form data. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/passes");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/passes")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/visitor/orders/passes");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/visitor/orders/passes", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"passId": "string",
"offerName": "string",
"productName": "string",
"isCancelled": true,
"validity": {
"validFrom": "2026-07-30T12:15:54.203Z",
"validTill": "2026-07-30T12:15:54.203Z"
},
"passType": "string",
"offerId": 0,
"productId": 0,
"dateOfFirstVisit": "2026-07-30T12:15:54.203Z",
"orderNumber": "string",
"orderId": 0,
"visitorData": "string",
"cancellationValidTill": "string",
"validityPeriod": {
"from": "string",
"till": "string"
},
"rebookingValidTill": "string"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderLines":[
{
"id": "number",
"quantity": "number"
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
id | number | true | This is the id of the orderline in your order. |
quantity | number | true | This represents the quantity to which the order line will be updated. For group tickets, you can combine all groups, and new groups will be recalculated accordingly. |
Success response code: 200 OK
Parameters:
Parameter | Description |
|---|---|
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
product (orderItems) | Only for 'regular' offers and 'group' offers with 'group tickets'. |
offertype |
|
frequencyType | 1 = Total 2 = PerDay 3 = PerSlot |
barcodeGenerationStrategy |
|
pricingStrategy |
|
groups | Only for 'group' offers. |
orderItems |
|
productOrderLines | Applies to all group offers. For other offer types, it will be null. NoteEither |
id (productOrderLines) | orderline ID |
linkedProducts | Only set for voucher offer products. |
type (discountSources) | Eg: "Campaign" or "Promotion" |
codes (discountSources) | The list of applied discount codes of this promotion. Empty if the promotion does not use discount codes. |
Extra information about the response can be found in Get order detail.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/calculate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderLines\":[]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0/calculate")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderLines\":[]}")
.asString();
const data = "{\"orderLines\":[]}";
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/directsellingapi/v4/visitor/orders/0/calculate");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderLines\":[]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v4/visitor/orders/0/calculate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"status": 1,
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"language": "string",
"createdOn": "string",
"lastUpdatedOn": "string",
"referenceId": "string",
"orderItems": [
{
"id": 0,
"unitPrice": 0,
"vatRate": 0,
"quantity": 0,
"visitDate": "string",
"rebookingValidTill": "string",
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"timeSlot": {
"id": 0,
"start": "2026-07-30T12:16:56.268Z",
"end": "2026-07-30T12:16:56.268Z"
},
"offer": {
"id": 0,
"name": "string",
"imageUrl": "string",
"frequencyType": "string",
"offerType": "string",
"ticketOfferType": "string",
"barcodeGenerationStrategy": "string",
"pricingStrategy": "string",
"eventId": 0,
"startDate": "2026-07-30T12:16:56.268Z",
"endDate": "2026-07-30T12:16:56.268Z"
},
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0,
"cost": 0
},
"groups": [
{
"numberOfVisitors": 0
}
],
"productOrderLines": [
{
"id": 0,
"unitPrice": 0,
"quantity": 0,
"product": {
"id": 0,
"name": "string",
"price": 0,
"vatRate": 0,
"linkedProducts": [
{
"id": 0,
"quantity": 0,
"price": 0
}
]
},
"guideLanguage": "string",
"pricing": {
"subTotal": 0,
"discount": 0,
"total": 0
},
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:16:56.268Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0
}
],
"passes": [
{
"id": "string",
"isScanned": true,
"createdOn": "2026-07-30T12:16:56.268Z",
"externalCode": "string",
"passbookKey": "string",
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
]
}
],
"voucherPassId": "string",
"voucherUnitPrice": 0,
"offerReservationGroupId": 0
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"gender": 0,
"dateOfBirth": "2026-07-30T12:16:56.271Z",
"address": {
"country": "string",
"countryName": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"newsletterOptIn": true,
"groupName": "string",
"remarks": "string",
"reasonForVisit": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"ageRange": "string"
},
"hasPendingRebook": true,
"payLater": true,
"isGiftAidConsent": true,
"discount": {
"codes": [
"string"
],
"amount": 0
},
"discountSources": [
{
"type": "string",
"name": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"codes": [
"string"
],
"loyaltyInfoModel": {
"cardNumber": "string",
"brand": "string"
}
}
],
"salesPoint": {
"id": 0,
"channelType": 0,
"name": "string"
},
"customer": {
"id": 0,
"hasAccount": true
},
"crossSellRelationships": [
{
"mainOfferReservationGroupId": 0,
"crossSells": [
{
"offerReservationGroupId": 0,
"metadata": {
"required": true,
"quantityConstraint": "string"
}
}
]
}
]
}{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
{
"orderLines":[
{
"id": "number",
"quantity": "number"
}
]
}
Property | Type | Required | Description |
|---|---|---|---|
id | number | true | This is the id of the orderline in your order. |
quantity | number | true | This represents the quantity to which the order line will be updated. For group tickets, you can combine all groups, and new groups will be recalculated accordingly. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0");
var request = new RestRequest(Method.PATCH);
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderLines\":[]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.patch("https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/0")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderLines\":[]}")
.asString();
const data = "{\"orderLines\":[]}";
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://api.staging-enviso.io/directsellingapi/v4/visitor/orders/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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderLines\":[]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PATCH", "/v4/visitor/orders/0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number",
"propertyName": "string",
"trace": "string",
"messageValues": {
"string": "string"
}
}]
}
Name | Type | Required | Description |
|---|---|---|---|
passid | string | true | The unique identifier of the pass you want to validate. Eg: EOP02DL948D8SZIB |
Success response code: 200 OK
Parameters:
Parameter | Description |
|---|---|
linkedTicketOffer | Null if the voucher has multiple offers configured. |
discountType | 0 = Percentage 1 = Amount |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes/vouchers/string/validate");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes/vouchers/string/validate")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/passes/vouchers/string/validate");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/passes/vouchers/string/validate", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"voucher": "string",
"voucherOfferId": "number",
"linkedTicketOffer": "number",
"linkedProducts": [{
"id": "number",
"quantity": "number",
"price": "number",
"linkedOfferId": "number",
"discountType": "number",
"discount": "number",
"maxRedeemableTicketsPerOffer": "number"
}]
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
passid | string | true | The unique identifier of the pass you want to validate. Eg: EOP02DL948D8SZIB/availabledays |
Name | Type | Required | Description |
|---|---|---|---|
from | date | true | The from date to be used for filtering. Format: yyyy-MM-dd NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
till | date | true | The till date to be used for filtering. Format: yyyy-MM-dd NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
The date range (from - till) can not exceed the maximum of 31 days.
Success response code: 200 OK
An example of date in the response is '2024-07-28'.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes/vouchers/string/availabledays");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes/vouchers/string/availabledays")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/passes/vouchers/string/availabledays");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/passes/vouchers/string/availabledays", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"dates": [
"date"
]
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
passid | string | true | The unique identifier of the pass for which you want to download the passbook file. Eg: /passes/EOP02DL948D8SZIB/passbooks/8d2d8d0a-a15c-4c6a-8d8e-ccbbd6126db4 |
key | string | true | The unique key of the passbook file. Eg: /passes/EOP02DL948D8SZIB/passbooks/8d2d8d0a-a15c-4c6a-8d8e-ccbbd6126db4 |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes/string/passbooks/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes/string/passbooks/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/passes/string/passbooks/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/passes/string/passbooks/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Eg: /forms/fields?language=en |
validfrom | date | false (Required if orderid is not passed) | Filter from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: validfrom=2023-09-01T00:00:00Z |
validtill | date | false (Required if orderid is not passed) | Filter end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: validtill=2023-09-31T23:59:59Z |
page | number | false | The page of the pass list you want to receive. Default: 0 Eg: page=1 |
perpage | number | false | The number of passes you want to receive per page. Default: 50 Eg: perpage=10 |
passtype | string | false | The type of pass you want to filter on. Supported values:
Eg: passtype=Ticket |
Success response code: 200 OK
Parameter | Description |
|---|---|
passtype | Any one of the following:
|
isscanned | Determines if the pass was used or not. |
iscancelled | Returns true if the pass is cancelled, otherwise, returns false. |
visitordata | Visitor form data related to the pass. |
orderid | The unique identifier of the order in which the pass was sold. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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", "/v4/passes");
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);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/passes", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"passId": "string",
"passType" : "string",
"createdOn": "datetime",
"validity":
{
"validFrom" : "datetime",
"validTill" : "datetime"
},
"isScanned" : "boolean",
"isCancelled" : "boolean",
"externalCode": "string"
"passbookKey": "string",
"visitorData": {},
"orderId": "number",
"orderLineId": "number",
"numberOfVisitors": "number",
"cancellationValidTill":"string",
"rebookingValidTill":"string",
"discount": {
"amount": "decimal",
"discountSources": [
{
"type": "string",
"name": "string",
"codes": ["string"],
"loyaltyInfo": {
"cardNumber": "string",
"brand": "string"
}
}
]
},
"validityPeriod": {
"from": "string",
"till": "string"
}
}
]
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the pass, typically starting with ‘EO’. Eg: passes/EOIT2D5D58Y8JB8O |
Success response code: 200 OK
Parameter | Description |
|---|---|
type |
|
isScanned | Determines if the pass was used or not. |
isCancelled | Returns true if the pass is cancelled, otherwise, returns false. |
visitorData | Visitor form data related to the pass. |
orderId | The unique identifier of the order in which the pass was sold. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddHeader("Authorization", "string");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("x-api-key", "API_KEY")
.header("Authorization", "string")
.asString();
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/directsellingapi/v4/passes/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.setRequestHeader("x-web-app", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'x-api-key': "API_KEY",
'x-web-app': "string",
'Authorization': "string"
}
conn.request("GET", "/directsellingapi/v4/passes/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"passId": "string",
"passType" : "string",
"createdOn": "datetime",
"validity":
{
"validFrom" : "datetime",
"validTill" : "datetime"
},
"isScanned" : "boolean",
"isCancelled" : "boolean",
"externalCode": "string"
"passbookKey": "string",
"visitorData": {},
"orderId": "number",
"numberOfVisitors": "number",
"cancellationValidTill":"string",
"rebookingValidTill":"string",
"discount": {
"amount": "decimal",
"discountSources": [
{
"type": "string",
"name": "string",
"codes": ["string"],
"loyaltyInfo": {
"cardNumber": "string",
"brand": "string"
}
}
]
},
"validityPeriod": {
"from": "string",
"till": "string"
}
}
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
passid | string | true | The unique identifier of the pass. Eg: EOFR2GHP52T94CDX |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/passes/memberships/string");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/passes/memberships/string")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/passes/memberships/string");
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);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v4/passes/memberships/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"passId": "string",
"name": "string",
"productName": "string",
"validFrom": "string",
"validTill": "string",
"daysOfWeek": [
0
],
"startTime": "string",
"endTime": "string",
"imageUrl": "string",
"offerId": 0,
"productId": 0,
"membershipHolder": {
"name": "string",
"birthDate": "string",
"pictureUrl": "string"
}
}
Success response code: 200 OK
Parameter | Description |
|---|---|
type | "Other", "Partner", "Child" |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v4/customers/0/profile");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v4/customers/0/profile")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v4/customers/0/profile");
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.setRequestHeader("x-web-app", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY",
'x-web-app': "string"
}
conn.request("GET", "/v4/customers/0/profile", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"firstName": "string",
"lastName": "string",
"email": "string",
"language": "string",
"country": "string",
"pictureUrl": "string",
"relations": [
{
"id": 0,
"firstName": "string",
"lastName": "string",
"type": "string",
"birthDate": "2019-08-24T14:15:22Z",
"pictureUrl": "string",
"active": true
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}This section contains the notable changes in the Direct selling API.
Aug 2026
Added a new property Categories in response of Get offer detail & List offers endpoints.
July 2026
Added a new property MaxRedeemableTicketsPerOffer in response of Get offer detail & Validate voucher pass endpoints.
Added a new property ReservedAt to various reservation collections in a Get basket endpoint. This allows integrators to sort reservations by their creation date and time in a full basket containing different reservation types.
June 2026
Added a new property isGiftAidConsent in response of Get order detail & Get order detail (visitor) endpoints.
Added rebookingValidTill & cancellationValidTillperiod details to the List passes , Get Pass Detail & Get order passes in visitors endpoint.
Added anew property IsGiftAId in response of List sales and Get sales detail endpoints.
Added a new property validityPeriod in response of List sales , Get sale detail, Get order passes (visitor), List passes and Get pass endpoints.
May 2026
Added numberOfVisitors field in List passes and Get pass endpoints.
Added a new property customer in response of of Get order detail , Get order detail by order number and List sales endpoints .
Added a new property MembershipHolder in response of List sales & Get sales detail endpoints.
Added a new endpoint Update Gift Aid consent in the Baskets.
Added a isGiftAidConsent field in response of Get basket endpoint.
Expose a shortDescription field for ticket and voucher offers as well in the response of the Get offer detail , List offers & Get offer translations endpoints.
Added new mainOfferReservationConstraint field in the response of Get basket endpoint.
Added isGiftAid field in ticketReservations in response of Get basket endpoint.
Extended response of Get offer detail endpoint with field isGiftAidProduct.
Added orderlineId field in response of List passes endpoint.
Added new query parameter validateForms in Checkout basket (create order) endpoint.
Added new Customer controller api endpoint to fetch the corresponding profile info by customer id.
Added a new endpoint to Get basket forms fields in the Baskets.
Apr 2026
autoSelectDate property has been removed on the customSetting object in the response of Get cross sell offers endpoint.
Extend order details with crossSellRelationsShips and offerReservationGroupId in Get order detail , Get order detail by order number & in Visitor Get order detail endpoints.
Extended Get offer detail with loyaltyInfo on products in case of loyalty products.
Added Add CrossSell Reservation endpoint and updated response of Add basket Reservation.
Extended Validate Loyalty Card endpoint with fields firstName and postalCode.
Added LoyaltyInfo on products in Get Offer Detail endpoint.
Added sales period in List offers and Get offer detail endpoint.
Added filter offers based on sales period in List offers endpoint.
Mar 2026
Added a new endpoint Validate loyalty card.
Added LoyaltyInfo and type on passes discount for the endpoints List passes and Get pass.
Added limitTicketQuantityByMainOffer object in response of Get cross-sell offers.
Added isLoyaltyProduct field in response of the Get offer detail endpoint.
Added LoyaltyCardInfo object in Create basket and Add basket reservation.
Added requiredOfferSelection field in response of Get cross-sell offers
Added productVisitors field in request of Create basket and Add reservation.
Added extra description to productVisitors field in request of Create basket and Add reservation.
Feb 2026
Added Loyalty discount fields to the get sales endpoints - List sales and Get sale detail.
Added Loyalty discount fields to the get order details endpoints - Get order detail and Get order detail by order number.
Added crossSellOfferTimeSlotWindow object in response to the endpoint Get cross-sell offers.
Added a new field poNumber to List sales and Get sale detail endpoints.
The page and perpage parameters are now required for the Get event time slots endpoint.
Jan 2026
Added new endpoint Get event time slots to fetch time slots of a given event.
Added timeSlotId query parameter to the Get cross-sell offers endpoint.
Added customSetting object in response of the Get cross-sell offers endpoint.
Added the request parameter includetimeslots to the Get event details endpoint.
Added PostbackUri to the Initiate payment for order endpoint.
Added X to the response of the Get venue information endpoint.
Dec 2025
Added pricingStrategy to the response of the endpoints Get offer detail, Get order detail , Get order detail (Visitor), and Calculate reserved order.
Nov 2025
Added the discount field to the Passes (List passes, Get passes) and Sales (List sales, Get sale detail) endpoints to reflect the discount applied per pass.
Added rebookingValidTill for the endpoints Get order detail and Get order detail for visitor.
Added VoucherPassId to the sales line details. The affected endpoints are List sales and Get sale detail. This attribute will be filled for sales lines linked to a voucher redemption, and will contain the linked voucher pass ID. This allows integrators to link ticket passes to the redeemed voucher passes.
Oct 2025
Added new query parameter bypass-ticket-distribution to the Checkout basket (create order) endpoint that determines whether tickets need to be generated or not.
Order detail response for visitors now include a pricing object per order item and a pricing object on order level. This affects the endpoint Get order details as visitor.
Sept 2025
Added a new query parameter include-passes that determines if passes should be included or excluded in the list of sales for the endpoint List sales.
Support a list of order identifiers when getting passes using the endpoint List passes.
The List passes endpoint has been extended with a query parameter passtype to support filtering on the pass type.
Jul 2025
Added imageUrl field to the Get Offer Detail endpoint in Products.
Added new endpoint Get pass to fetch pass details by unique identifier.
Added passType, validty, isCancelled, orderId to the response of the List passes endpoint. This aligns the List passes and Get pass response objects.
Made validfrom and validtill query parameters optional. They are no longer required when orderid is provided. This affects the endpoint List passes.
Moved the endpoint Get cross-sell offers under Offers.
Added visitorData object in the response of Get order passes (Visitor) and Search passes (Passes) endpoints.
Added basketid, offerid, selectedproductids, selecteddate query parameters to Get cross-sell offers endpoint.
Added id and code to the productGroup object, and vatRateId to the sales line response of the endpoints List sales and Get sales detail.
Added externalCode to the endpoints List sales and Get sales detail.
Jun 2025
Added a new endpoint, Get membership details by pass ID, to get membership details by pass ID.
Added a new endpoint, Get cross-sell offers , to fetch cross-sell offers.
Added OriginalPrice and OriginalUnitPrice to the Get basket endpoint.
Added OriginalPrice in response to List prices and List prices for a single day endpoints.
Added productGroup with Salesline in the response object of the List sales and Get sales detail endpoints, and sent along with the existing sales data to Recreatex.
Extended the response of the endpoint Validate voucher pass with discount information discountType , and the discount were added to the linkedProducts.
May 2025
Added a new endpoint Get order passes to fetch passes of an order.
Supported flexible dates membership in Create (Reserve) order and Confirm order endpoints.
Apr 2025
Added parameter enforceMinQuantity to the endpoint Get offer detail.
Added the validity parameter to the Create basket, Get basket , and Add basket reservation endpoints to support membership offers with flexible dates.
Added new fields, ledger account name, and ledger account number to the salesLines section of the endpoints List sales and Get sales detail.
Added a new endpoint Calculate reserved order for visitors.
Added a new endpoint Patch reserved order for visitors.
Added a new endpoint Get outstanding payment to retrieve the outstanding payment amount for a specific order.
Add PayLater property to the Get order detail endpoint.
Added additional information about the response for the endpoint Get order detail.
Added new parameter in the Create basket request.
Added a new endpoint Patched reserved order. This endpoint updates an order by adjusting its capacity and recalculating the prices.
Added a new endpoint Calculate reserved order. This endpoint determines whether the new quantities fit within the available capacity and calculates a corresponding new price, while leaving the order unchanged.
Added a new endpoint Get order detail by order number to get an order by its unique number.
Mar 2025
Added a new endpoint Delete basket to delete the full basket by ID. This endpoint will revert the taken capacity, used discount codes, etc. for all reservations in the basket. Once a basket is deleted, it cannot be restored.
Added new fields validFrom and validTill in the barcodes of the response object of the List sales and Get sale detail endpoints.
Added a new endpoint Download passbook to download the passbook file of a certain pass.
Added new fields passbookKey in the Passes of the response object of the endpoints Get order detail and Rebook order.
Feb 2025
Added new fields minQuantity and maxQuantity to the Get offer detail endpoint.
Dec 2024
Added the ExternalCode field in the Passes of the response object of the endpoints Get order detail and Rebook order.
Added query parameter language to the Get order detail endpoint. If passed, it will translate all translatable content into the desired language.
Updated the endpoint Checkout basket to support membership checkout as a guest.
Added the properties id and codes to the discountSources property of the endpoint Get order detail.
Nov 2024
The response parameter imageurl has been added for the endpoints List Offers and Get Offer Detail.
The link provided in the response of the endpoints List Offers, Get Offer Detail, and Get memberships is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
These endpoints are obsolete - Get offer image (Offers) and Get offer image (Visitors).
Added a property Visitors as a request body parameter for the endpoint Take and release capacity.
Added a new endpoint Initiate rebook to start a rebook for the given order.
Added a new endpoint Confirm rebook to confirm rebooking for the given order.
Added a new endpoint Cancel rebook which cancels a pending rebook for the given order.
Added a new endpoint Calculate rebook payment amount which calculates the payment amount of a rebook order.
Oct 2024
9 Oct 2024: The obsoleted field LengthInMonth has been removed from the endpoint Get offer detail.
2 Oct 2024: Added a new field period in membership offer validity for the endpoint Get offer detail. The field LengthInMonth has been obsoleted.
Sep 2024
A new field VatRate has been added in the response for the endpoints List sales and Get sale detail.
Aug 2024
Added a new endpoint Get voucher pass availability to fetch the available days on which a voucher pass can be exchanged within a certain period.
Added a new endpoint Get offer pass validity to fetch the pass validity for an offer.
July 2024
Added a new endpoint Get voucher pass validation to check if the voucher pass is still valid.
The endpoint, Create basket now supports vouchers, products, and quantity.
The response of the endpoint Get basket now contains voucher property and pricing changes on ticket reservation.
Updated the request body of Add reservation(s) to basket to support vouchers, products, and quantity.
For the endpoint Get order detail, added voucherPassId and voucherUnitPrice on order detail, for regular offers and group offers.
May 2024
Added a new endpoint 'Assign membership to either the logged-in visitor or a relation' that allows assigning the membership available in the basket to either the currently logged-in visitor or a relation of the visitor.
Removed the endpoints - 'Assign logged-in visitor' and 'Assign relation'.
Route changed for the endpoint Checkout Basket (As Visitor) from /baskets/{id}/checkoutasvisitor to /visitor/baskets/{id}/checkout.
Route changed for the endpoint Deactivate relation from /visitor/{id}/deactivate to /visitor/relations/{id}/deactivate.
Route changed for the endpoint Activate relation from /visitor/{id}/activate to /visitor/relations/{id}/activate.
April 2024
Support Membership in offer and basket API.
Added new endpoint Assign Customer to Basket Membership Products to support membership.
Removed the endpoint 'Get Offer Metadata' endpoint. It will be a part of the endpoint Offer details.
It is possible to configure the basket expiry time. Refer to the endpoint Create basket.
Moved the endpoint 'Checkout basket as visitors' from Orders to Visitor.
Removed Links from the response in all the List endpoints.
Removed 'x-page-count' and 'link' from the header response.
Removed salespointid from the request query parameter for the endpoints Cancel order, Confirm order and Rebook order.
Added query parameter language to the Get order detail endpoint. If passed, it will translate all translatable content into the desired language.
The link provided in the response of the endpoints List offers, Get offer detail, and Get memberships is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
For the endpoints List offers and Get offer detail, the link relation type for image is now a CDN link.
These endpoints are obsolete - Get offer image (Offers) and Get offer image (Visitors).
Added OrderId property to visitor Get order passes endpoint.
Added passes to the order detail response for the endpoint Get order detail
Added IsScanned property to barcodes in the visitor order detail response for the endpoint Get order details.
Added HasPendingRebook property to visitor order overview for the endpoint Get orders.
Added ExpiresOn property on visitor rebook initiate. Also, changed the rebook expiry from 2 hours to 2 days.
Updated description of visitor rebook cancellation. Open payments can now be cancelled.
Updated order payment operation to allow payments with a pay-by-link for the endpoint Initiate payment for order. Also, added HTTP 401 Unauthorized error response.
Added description of product to the offer detail response for the endpoint Get offer detail.
Added description of product to the offer translation response for the endpoint Get offer translations.
Remove salespoint id requirement and parameter from fetching order details from the endpoints Get order detail and Get order details.
Updated the Initiate drop-in payment session for order endpoint.
Added the amount property on the 200 OK response.
Added HTTP 204 response.
Added visitor rebook initiate endpoint
Added visitor confirm rebook endpoint
Added visitor cancel rebook endpoint
Added the SaleType field and SkipRebook query filter for the sales endpoint.
Added new endpoint Get order passes to get the passes of orders.
Added a new endpoint Get offer translations to fetch translations of a specific offer.
Added new endpoints Add discount code to basket and Remove discount code from basket.
Added a new endpoint List prices to retrieve all the prices for the products of an offer over a period of time.
Added a new endpoint List prices for a single day to retrieve the price for each time slot of an offer for a single day.
Added a new field lastUpdatedOn for the endpoints List offers and Get offer detail. These endpoints now include the last modification date in the response.
Added a new query parameter updatedsince to the endpoint List offers
Added a new field guideLanguages to the endpoint Get offer detail.
Added a new field offerType for the endpoints List sales and Get sale detail.
Added the query parameter only-include-product-sales-lines to the endpoints List sales and Get sale detail.
Added a new endpoint for initiating a drop-in payment based on order.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is now obsolete.
Changed reservation and order endpoints to work with the basket system in Enviso. Includes support for the group and guided offers.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is obsolete.
Initial version
The Direct selling API allows you to retrieve offers that are published to a specific sales point on the direct sales channel, and sell products related to the offer. This API is mainly used for selling products through direct sales channels such as cash registers, self-service kiosks, or websites.
All information that passes through the Direct selling API is stored in Enviso.
In the context of using the Direct selling API, here's a short description of what certain terminologies imply.
Venue | A venue is an organisation unit that registers on the enviso sales application for selling their tickets through one or more sales channels (direct or indirect). |
Organisation | An organisation is the overarching term that is used for bundling multiple venue units. In this case, multiple venue units are part of one organisation. |
Sales point | A sales point is a physical or virtual location where orders can occur and sales can be made. Eg: Cash register (physical) or Web shop (virtual) |
Product | A product is a sell-able thing. In the context of the Direct selling API this can be referred to as a ticket. Eg: Adult safari ticket is referred to as a product. NoteResult of a product sale is a ticket barcode. |
Offer | An offer is a bundle of Product(s) made available for selling. Eg: An offer could consist of Adult safari ticket. While another offer could consist of two products, Adult safari ticket and Child safari ticket. |
Capacity | Capacity refers to the restriction on the number of visitors for an offer. Capacity types are per day, per slot and total. |
Reservation | A reservation is a temporary reserved product. When a reservation is created, the total capacity is reduced with the number of products that are reserved. By default, the reservation time is 30 minutes. This means that if a reservation is not confirmed within 30 minutes, the system will automatically expire the reservation and add the reserved number of products to the total capacity again. |
Basket | A basket is a bundle of temporarily reserved products. When the first reservation is created, a basket is automatically created as well. A basket can be altered by adding new reservations, editing existing reservations or removing reservations from the basket. |
Order | An order is the result of a basket checkout. When a basket is ready to be paid, then we can checkout the basket which will result in a new order. This is necessary to take the end-user to the payment step. |
Sale | A sale is the result of a paid order. When an order is paid, it results in a sale that contains links to both the order and the related payment details. |

Search products (offers)
The Direct selling API returns the offers which are published to the corresponding direct channel sales point. Every offer contains one or more products which can be sold.
Eg.: "Entrance to the museum" can be an offer where "Child ticket" & "Adult ticket" are it's products.
Create reservation
Create a reservation for a product. The needed capacity will be reserved for a temporary amount of time (by default 30 minutes).
Eg.: A family decides to visit the museum and wants to buy 2 "Adult tickets" and 1 "Child ticket". For this 2 reservations are needed.
The creation of your first reservation will automatically create a new basket to which new reservations can be added or existing reservations can be removed or altered.
Checkout order
Checkout the basket containing all the reservations to create an order which can be paid.
Once the order is created, the capacity is now reserved for a longer amount of time to make sure that the end user has time to finalize his payment.
Eg.: Both reservations are part of the same basket, so the basket containing 2 reservations from the previous step are bundled into a single order.
Pay (confirm) order
The visitor pays the order (= confirms the order) and as a result the corresponding sales are created in Enviso.
Eg.: The payment for the order that was created in previous step has been approved. By confirming the order, the sales are created in Enviso and the tickets (with barcodes or QR codes) are generated.
The following image shows a high-level overview of the domain model for the Direct Selling API.

The Direct selling API is a REST API solution and attempts to conform to the RESTful design principles.
Throughout the document, {version} stands for the first digit of the version in use.
Eg: If you are using version 3.0, {version} would mean v3
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)
The following HTTP status codes are used within the Direct selling 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 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. NoteIt 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. |
409 | Conflict The request could not be handled due to a conflict. This can be caused by an update of a resource conflicting with a prior change or data being out-of-sync. 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 fail. |
429 | Too Many Requests The server received too many request 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. |
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_tokenCode | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field> must not exceed <field_max> characters. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
1012 | <field> must be between <field_min> and <field_max>. |
1013 | <field> must not be in the past. |
4004 | Order ID <field_identifier> is not valid. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4012 | Reservations should occur per offer. |
4013 | Reservation ID <field_identifier> has expired. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4021 | Timeslot ID is not in the offer period. |
4022 | Visit date cannot be in the past. |
4023 | Visit date is not in the offer period. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4091 | Duplicate Reservation ID found. |
4092 | A maximum of 25 tickets can be added at a time. |
4093 | A maximum of total 100 tickets can be added at a time in an order. |
4098 | The entity could not be saved. |
4101 | One or more products not found. |
4102 | Reservations should occur per offer. |
4103 | One or more reservations not found. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
4107 |
|
4014 | Reservation <field_identifier> is already confirmed. You can't create order for already confirmed reservation. |
4018 |
|
4019 | Product ID <field_identifier> cannot be reserved as the offer has expired. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4123 | Order should occur per offer. |
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 Direct selling API.
For this, you'll need to use the Authentication API.
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 Direct selling API.
Contact Vintia support to get your production environment keys of the Authentication API and Direct selling API.
Change the base URL from the staging environment to the production environment.
Production environment: https://api.enviso.io/directsellingapi
Staging environment: https://api.staging-enviso.io/directsellingapi
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | Filter offer using from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2018-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | Filter offer using end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2018-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
searchcolumns | string | false | Filter offers by a certain field. For now, it is only possible to filter on offer name.
|
searchterm | string | false | Filter offers using the provided search term.
|
page | integer | false | Start page number for the range to show in the result set. If omitted, the first page of results will be returned.
|
perpage | integer | false | Number of results per page. If omitted, the default page size will be used.
|
language | string | false | The ISO 639-1 language code in which the offer information should be returned. Default = en |
updatedsince | date | false | When set, returns only those offers that have been updated since the given date (inclusive). Format: yyyy-MM-dd Example: updatedsince=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
Response header | |
|---|---|
link |
|
Link relationship types
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer | GET |
|
image | Get the offer image NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | GET |
|
Enum values
Parameter | Value |
|---|---|
(offer) type |
|
ticketType |
NoteWhen offer type is 'Regular', the ticketType will be 'null'. |
Possible error codes
Code | Message |
|---|---|
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1012 | <field> must be between <field_min> and <field_max>. |
9023 | The provided value for <field> must be passed in <field_format> format. |
9024 | From date must be less than To date |
9025 | Sales Point ID <field_identifier> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/string/offers");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/string/offers")
.header("Accept", "application/json")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/salespoints/string/offers");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'x-tenantsecretkey': "string",
'Authorization': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/string/offers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offers": [
{
"offer": {
"id": "number",
"name": "string",
"description": "string",
"type": "string",
"start": "date",
"end": "date",
"lastUpdatedOn": "date",
"eventId": "number",
"tags": [
"string"
],
"ticketType": "string"
},
"links": [
{
"rel": "item",
"href": "url_to_offer_detail"
},
{
"rel": "image",
"href": "url_to_offer_image"
}
]
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
offerid | integer | true | The unique identifier of the offer. |
salespointid | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | true | The ISO 639-1 language code in which the offer information should be returned. Default: en |
Success response code: 200 OK
Link relationship types:
Relationship | Description | URL |
|---|---|---|
self | Get the detailed information about the offer |
|
image | Get the offer image NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | |
capacity | Get single offer capacity (in total, for 1 day or for 1 slot) |
|
capacities | Get the offer capacities in bulk |
|
timeslots | Get the offer time slots (when time slots are used) |
|
reserve | Reserve an offer product |
|
Possible errors:
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
Parameters:
Parameter | Description |
|---|---|
type |
|
ticketType |
Value will be available only for group offers. |
tags | Tags are available for Voucher and Membership in version 4 of the Direct selling API. |
minimumGroupSize | It may have value only for group offers. |
groupSize | The number of visitors per group. Applicable only for group offers. |
frequency |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/salespoints/0/offers/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offer": {
"id": "number",
"name": "string",
"type": "string",
"description": "string",
"start": "2020-10-09T08:43:43.227Z",
"end": "2020-10-09T08:43:43.227Z",
"eventId": "number",
"groupSize": "number",
"capacity": {
"frequency": "string",
"amount": "number"
},
"products": [
{
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "number"
},
"links": [
{
"rel": "string",
"href": "string"
}
]
},
{
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "decimal"
},
"links": [
{
"rel": "string",
"href": "string"
}
]
}
],
"ticketType": "string",
"minimumGroupSize": "number",
"lastUpdatedOn": "2025-03-31T14:01:28",
"guideLanguages": [],
"tags": []
},
"links": [
{
"rel": "self",
"href": "string"
},
{
"rel": "image",
"href": "string"
},
{
"rel": "capacity",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve time slots for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | The from date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | The to date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
capacity | Get the capacity for the timeslot |
|
offer | Get the detailed information about the offer |
|
Possible error code
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/timeslots");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/timeslots")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/salespoints/0/offers/0/timeslots");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/timeslots", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeslots": [
{
"timeslot": {
"id": 0,
"start": "2020-10-09T08:54:29.956Z",
"end": "2020-10-09T08:54:29.956Z"
},
"links": [
{
"rel": "capacity",
"href": "url_to_offer_capacity"
}
]
}
],
"links": [
{
"rel": "offer",
"href": "url_to_offer_detail"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
This endpoint is obsolete. Please refer to the image URL added under links in the response of the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
imagekey | string | true | The unique key of the image. |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/offers/0/images/string");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/offers/0/images/string")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/offers/0/images/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"value": {},
"formatters": [
{}
],
"contentTypes": [
"string"
],
"declaredType": "string",
"statusCode": 0
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | The from date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | The to date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
Response parameters per capacity type:
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
totalQuantity |
|
|
|
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Parameters
Parameter | Description |
|---|---|
frequency |
|
totalQuantity | This parameter will only show for per slot offers. |
Possible error codes
Code: | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/capacities");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/capacities")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/salespoints/0/offers/0/capacities");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/capacities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"frequency": "string",
"capacities": [
{
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-29T11:00:00",
"end": "2025-06-29T12:00:00"
},
"totalQuantity": "number"
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the sales point. Offers will be included in the result set only when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: fromdate=2019-01-01 |
todate | date | true | The to date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: todate=2019-01-31 |
quantity | integer | false | The ticket quantity to fetch the available days for. Default value: 1 Days will only be included in the result set when:
|
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/availabledays");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/availabledays")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/salespoints/0/offers/0/availabledays");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/availabledays", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"availableDays": [
"2025-06-29T00:00:00",
"2025-06-30T00:00:00"
],
"capacityPerDay": [
{
"day": "2025-06-29T00:00:00",
"availability": {
"available": "number",
"total": "number"
}
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
Success response code: 200 OK
Parameters
Parameter | Description |
|---|---|
guideRequired | If true, then |
cutOffDuration | This is for timeslot (event) offers. |
Link relationship types
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer | GET |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/offers/string/metadata");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/offers/string/metadata")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/offers/string/metadata");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/offers/string/metadata", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"languagesOffered": ["string"],
"visitDuration": "00:00:00",
"cutOffDuration": "00:01:00",
"formId": "string",
"guideRequired": "boolean",
"guideSkills": ["string"]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
offerid | route | true | The unique identifier of the offer. |
salespointid | route | true | The unique identifier of the sales point. |
timeslotid | query | true | The unique identifier of the timeslot. |
Property | Type | Required | Description |
|---|---|---|---|
quantity | number | false | For Regular offer: For Group offer group ticket/Group offer per person ticket: Use a positive number to take capacity (taken capacity = increased). Use a negative number to release capacity (taken capacity = decreased) |
visitors | number | false | For Regular offer: For Group offer group ticket/Group offer per person ticket: Use a positive number to take capacity (taken capacity = increased). Use a negative number to release capacity (taken capacity = decreased) Note
When you provide this information with a Group offer group ticket/Group offer per person ticket, the capacity will be increased or decreased from the visitor quota only. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0") .header("accept", "text/plain") .header("authorization", "string") .header("x-tenantsecretkey", "string") .header("origin", "string") .header("x-api-key", "API_KEY") .asString();
var data = null; var 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/directsellingapi/v3/salespoints/0/offers/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);
import http.client conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi") headers = { 'accept': "text/plain", 'authorization': "string", 'x-tenantsecretkey': "string", 'origin': "string", 'x-api-key': "API_KEY" } conn.request("GET", "/v3/salespoints/0/offers/0", headers=headers) res = conn.getresponse()
data = res.read() print(data.decode("utf-8"))
{
"quantity": "number"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
from | date | true | Filter offer from date. Format: yyyy-MM-dd Eg: from=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
to | date | true | Filter offer end date. Format: yyyy-MM-dd Eg: to=2023-04-30 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/prices");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/prices")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/salespoints/0/offers/0/prices");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/prices", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"days": [
{
"date": "2025-06-23",
"products": [
{
"id": "number",
"prices": [
"number"
],
"originalPrice": "number"
},
{
"id": "number",
"prices": [
"number"
],
"originalPrice": "number"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
date | date | true | Date to fetch price per time slot. Format: yyyy-MM-dd Eg: from=2023-04-01 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
The format for 'to' and 'from' timeslot is HH:mm:ss.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/priceperday");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/priceperday")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/salespoints/0/offers/0/priceperday");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/priceperday", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeSlots": [
{
"id": "number",
"from": "07:30:00",
"to": "08:30:00",
"products": [
{
"id": "number",
"price": "number",
"originalPrice": "number"
},
]
}]}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the offer. Eg: /offers/20/translation |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/offers/0/translation");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/offers/0/translation")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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", "v3/offers/0/translation");
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);
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/offers/0/translation", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"translations": [
{
"language": "string",
"translation": {
"name": "string",
"description": "string",
"shortDescription": "string",
"tags": [
"string"
],
"products": [
{
"id": "number",
"name": "string",
"description": "string"
}
]
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
offerid | number | false | The unique identifier of the offer to filter links for a specific offer. Eg: /offers/links?offerid=20 |
page | number | false | The page of the offer-links list you want to receive. Default: 0 Eg: page=1 |
perpage | number | false | The number of offer links to receive per page. Default: 50 Eg: perpage=25 |
Success response code: 200 OK
Enum value
Parameter | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/offers/links");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/offers/links")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/offers/links");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/offers/links", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"sourceId": "number",
"destinationId": "number",
"type": "string"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
id | number | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
date | date | false | The from date to fetch the capacity for. Format: yyyy-MM-ddTHH:mm:ssZ Eg: 2019-01-01T00:00:00Z NoteDate range (fromdate - todate) can not exceed a maximum of 31 days. |
timeslotid | date | false | The TimeslotID for which the capacity details are needed. |
Success response code: 200 OK
Parameters:
Parameter | Description |
|---|---|
frequency |
|
capacity | 1 = Free Selling 2 = Allocated |
date | Date format : yyyy-MM-dd (i.e. "2017-11-23") NoteCapacity will be date-wise if the capacity type is PER_DAY. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PerDay.
Response parameters per capacity type:
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
allocatedCapacity (limited) |
|
|
|
Link relationship types:
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible error codes:
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
1013 | <field_name> must not be in the past. |
4006 | Timeslot ID is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/capacity");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/salespoints/0/offers/0/capacity")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/salespoints/0/offers/0/capacity");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/salespoints/0/offers/0/capacity", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
For Total offer
{
"frequency": "string",
"capacity": {
"quantity": "number"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per day offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"date": "2025-06-23T00:00:00"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per slot offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-30T11:00:00",
"end": "2025-06-30T12:00:00"
}
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the event. |
Success response code: 200 OK
Booking type value | Booking type code |
|---|---|
1 | Single-slot |
2 | All slots |
Event type value | Event type code |
|---|---|
0 | Draft |
1 | Active |
2 | In active |
3 | Archived |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/events/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/events/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"name": "string",
"description": "string",
"startDate": "dateTime",
"endDate": "dateTime",
"quantity": "number",
"pictureUrl": "string",
"timeSlots": [
{
"id": "number",
"start": "dateTime",
"end": "dateTime",
"isBlocked": "boolean"
}
],
"hasTimeSlots": "boolean",
"address": {
"latitude": "number",
"longitude": "number"
},
"tags": [
{
"label": "string"
}
],
"bookingType": "number",
"status": "number"
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID on which you want to create a basket. |
Success response code: 201 Created
Parameter
Parameter | Description |
|---|---|
discountCodes | List of all the discount codes that are applied to the basket. |
Response parameters per capacity type
Depending on the frequency, the content of the request body should be different:
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
productId |
|
|
|
quantity NoteIn case of reservation of a group offer, the quantity will be the number of groups. Otherwise, the quantity will be the number of tickets. |
|
|
|
visitDate |
|
|
|
timeslotId |
|
|
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/baskets")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]")
.asString();
const data = JSON.stringify([
{
"productId": 0,
"quantity": 0,
"visitDate": "2019-08-24T14:15:22Z",
"timeSlotId": 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/directsellingapi/v3/baskets");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v3/baskets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"expireOn": "2020-10-14T19:25:32.059Z",
"pricing": {
"subtotal": "decimal",
"discount": "decimal",
"total": "decimal",
"cost": 0
},
"discountCodes": [],
"reservations": [
{
"id": "number",
"offerId": "number",
"visitDate": "2025-06-25T07:30:00Z",
"timeSlot": {
"id": "number",
"from": "2025-06-25T07:30:00Z",
"start": "2025-06-25T07:30:00Z",
"to": "2025-06-25T09:30:00Z",
"end": "2025-06-25T09:30:00Z"
},
"guideLanguage": "string",
"groups": [
{
"numberOfVisitors": "number"
}
],
"productReservations": [
{
"id": "number",
"productId": "number",
"quantity": "number",
"unitPrice": "decimal",
"pricing": {
"subtotal": "decimal",
"discount": "number",
"total": "decimal",
"cost": "number"
}
}
],
"pricing": {
"subtotal": "decimal",
"discount": "number",
"total": "decimal",
"cost": "number"
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
Success response code: 200 OK
Parameter
Parameter | Description |
|---|---|
(reservations) id | This field will have a value only if the reservation is a group reservation. Otherwise, it will be null. |
(productReservations) quantity | In case of a group reservation, the quantity will be in the number of groups. Otherwise, the quantity will be the number of tickets. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/baskets/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.asString();
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/directsellingapi/v3/baskets/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("GET", "/v3/baskets/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "GUID",
"expireOn": "2025-06-24T06:43:09Z",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"discountCodes": [],
"reservations": [
{
"offerId": "number",
"visitDate": "2025-06-25T07:35:00Z",
"timeSlot": {
"id": "number",
"from": "2025-06-25T07:35:00Z",
"start": "2025-06-25T07:35:00Z",
"to": "2025-06-25T08:40:00Z",
"end": "2025-06-25T08:40:00Z"
},
"guideLanguage": "string",
"productReservations": [
{
"id": "number",
"productId": "number",
"quantity": "number",
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
}
}
],
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
reservationid | number | true | The ID of the reservation |
Success response code: 200 OK
Parameter
Parameter | Description |
|---|---|
quantity | In case of reserving a group offer with group tickets, this will be the number of visitors. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations/string");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "{\"id\":0,\"quantity\":0}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations/string")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("{\"id\":0,\"quantity\":0}")
.asString();
const data = JSON.stringify({
"id": 0,
"quantity": 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/directsellingapi/v3/baskets/string/reservations/string");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"id\":0,\"quantity\":0}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("PUT", "/v3/baskets/string/reservations/string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "GUID",
"expireOn": "2025-06-24T07:11:45Z",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"discountCodes": [],
"reservations": [
{
"offerId": "number",
"visitDate": "2025-06-25T07:35:00Z",
"timeSlot": {
"id": "number",
"from": "2025-06-25T07:35:00Z",
"start": "2025-06-25T07:35:00Z",
"to": "2025-06-25T08:40:00Z",
"end": "2025-06-25T08:40:00Z"
},
"guideLanguage": "string",
"productReservations": [
{
"id": "number",
"productId": "number",
"quantity": "number",
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
}
}
],
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
}
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
reservationid | number | true | The ID of the reservation |
Success response code: 200 OK
Parameter
Parameter | Description |
|---|---|
quantity | In case of a group reservation, the quantity will be in number of groups. Otherwise, the quantity will be the number of tickets. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.asString();
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/directsellingapi/v3/baskets/string/reservations/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("DELETE", "/v3/baskets/string/reservations/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
Success response code: 200 OK
Depending on the frequency, the content of the request body should be different:
Response parameters per capacity type
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
productId |
|
|
|
quantity |
|
|
|
visitDate |
|
|
|
timeslotId |
|
|
|
Parameter
Parameter | Description |
|---|---|
(reservations) quantity | In case of a group reservation, the quantity will be in number of groups. |
numberOfVisitors | Number of visitors per group. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/reservations")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]")
.asString();
const data = JSON.stringify([
{
"productId": 0,
"quantity": 0,
"visitDate": "2019-08-24T14:15:22Z",
"timeSlotId": 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/directsellingapi/v3/baskets/string/reservations");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v3/baskets/string/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "GUID",
"expireOn": "2020-10-14T19:54:40.037Z",
"discountCode": "string",
"discountCodes": [
"string"
],
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number"
},
"reservations": [
{
"id": "number",
"productId": "number",
"offerId": "number",
"visitDate": "2020-10-14T19:54:40.037Z",
"timeSlot": {
"id": "number",
"start": "2020-10-14T19:54:40.037Z",
"end": "2020-10-14T19:54:40.037Z"
},
"quantity": "number",
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number"
},
"guideLanguage": "string",
"groups": [
{
"numberOfVisitors": "number"
}
]
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
code | string | true | The discount code. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
code | string | true | The discount code. |
Success response code: 204 No content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/discounts/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The two-letter language code of the visitor Eg: en |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/checkout");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/baskets/string/checkout")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
.asString();
const data = JSON.stringify({
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": 0,
"dateOfBirth": "2019-08-24",
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string"
},
"formIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
});
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/directsellingapi/v3/baskets/string/checkout");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v3/baskets/string/checkout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"amount": "number"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The two-letter language code of the visitor Eg: en |
An additional request header called x-visitor-token is required. This should contain the JWT acquired using the Enviso Authentication API ( /v1/visitor/exchange-token ).
Further documentation on how to obtain this JWT can be found in the Enviso Authentication API documentation.
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Parameter
Parameter | Value |
|---|---|
gender |
|
{
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": "number",
"dateOfBirth": "2019-08-24",
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string",
"covidFree": true,
"newsletterOptIn": true
},
"formIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
{
"visitor": {
"<key>": "<value>"
},
"formIds": "string"
}
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkoutasvisitor");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\",\"covidFree\":true,\"newsletterOptIn\":true},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkoutasvisitor")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\",\"covidFree\":true,\"newsletterOptIn\":true},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
.asString();
const data = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\",\"covidFree\":true,\"newsletterOptIn\":true},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}";
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/directsellingapi/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkoutasvisitor");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\",\"covidFree\":true,\"newsletterOptIn\":true},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/baskets/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkoutasvisitor", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"amount": "decimal"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to cancel. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | false | The sales point ID on which you want to cancel an order. |
Success response code: 204 No Content
Possible errors
Code | Message |
|---|---|
1003 | <field> must be greater than 0. |
4004 | Order ID <field_identifier> is not valid. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v3/orders/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/orders/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v3/orders/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to confirm. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | false | The sales point ID on which you want to confirm the order. |
sendemail | boolean | false | Indicates whether an e-mail with the tickets should be sent to the visitor. Default value: False |
Success response code: 200 OK
Link relationship types
Relationship | Description | Method | Format |
|---|---|---|---|
item | Gets the order detail | GET |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field_name> must not exceed <field_max> characters. |
4004 | Order ID <field_identifier> is not valid. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/string/confirm");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("undefined", "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/orders/string/confirm")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.body("{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = JSON.stringify({
"payment": {
"amount": {
"currency": "string",
"value": 0
},
"reference": "string",
"method": "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/directsellingapi/v3/orders/string/confirm");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-tenantsecretkey': "string",
'Authorization': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/orders/string/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"order": {
"id": "number",
"number": "string",
"amount": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
},
"sale": {
"id": "number",
"creationDate": "2020-10-15T05:57:47.401Z",
"amount": "number",
"salesPoint": {
"id": "number",
"name": "string"
"channelType": "string",
"partnerId": "number"
},
"lines": [
{
"id": "number",
"productId": "number",
"eventId": "number",
"timeSlotId": "number",
"unitPrice": "number",
"quantity": "number",
"amount": "number",
"creationDate": "2020-10-15T05:57:47.401Z",
"orderLineId": "number",
"vatRate": "number",
"barcodes": [
{
"barcode": "string",
"creationDate": "2020-10-15T05:57:47.401Z"
}
],
"salesLineType": "string"
}
],
"orderId": "number"
}
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The ISO 639-1 language code to be used for translatable data. Eg: /orders/56?language=fr |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
confirm | Confirms an order |
|
cancel | Cancels an order |
|
The links are only available when the order status is 'PENDING' as changes are not longer supported for cancelled or confirmed orders.
Parameters:
Parameter | Value/Description |
|---|---|
status |
|
(orderItems) product | Only for 'regular' offers and 'group' offers with 'group tickets'. For other offer types, it will be null. NoteEither |
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
groups | Only for 'group' offers. |
productOrderLines | Only for 'group' offers with 'individual tickets'. For other offer types, it will be null. NoteEither |
(productOrderLines) id | orderline ID |
visitor | This parameter is optional |
gender |
|
discountSources (type) |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/orders/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/orders/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/orders/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"status": "number",
"hasPendingRebook": "boolean",
"pricing": {
"subTotal": "decimal",
"discount": "decimal",
"cost": "decimal",
"total": "decimal"
},
"language": "string",
"createdOn": "2025-06-24T07:56:09Z",
"lastUpdatedOn": "2025-06-24T07:56:20Z",
"orderItems": [
{
"id": "number",
"quantity": "number",
"unitPrice": "decimal",
"visitDate": "2025-06-25T07:35:00Z",
"timeSlot": {
"id": "number",
"start": "2025-06-25T07:35:00",
"end": "2025-06-25T08:40:00"
},
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "decimal",
"vatRate": "decimal"
},
"guideLanguage": "string",
"offer": {
"id": "number",
"name": "string",
"type": "number",
"imageUrl": "string",
"frequencyType": "number",
"ticketType": "string",
"eventId": "number",
"startDate": "2024-04-14 18:30:00",
"endDate": "2029-12-31 18:29:59"
},
"pricing": {
"subTotal": "decimal",
"discount": "decimal",
"cost": "decimal",
"total": "decimal"
},
"groups": [],
"productOrderLines": [],
"passes": [
{
"id": "number",
"isScanned": "boolean",
"createdOn": "2025-06-24T07:56:20",
"externalCode": "number"
}
]
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "number",
"street": "string",
"number": "number"
},
"phone": "number",
"gender": "number",
"dateOfBirth": "2024-06-05",
"reasonForVisit": "kms reason for visit",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"newsletterOptIn": "boolean"
},
"links": [
{
"rel": "self",
"href": "string",
"method": "GET"
},
{
"rel": "cancel",
"href": "string",
"method": "DELETE"
}
],
"discountSources": [],
"salesPoint": {
"id": "number",
"name": "string",
"channelType": "number"
}
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | false | The sales point ID that is linked with the order. |
Success response code: 200 OK
Link relationship types:
Relationship | Description | Method | Format |
|---|---|---|---|
confirm | Confirm an order | POST |
|
cancel | Cancels an order | DELETE |
|
The links are only available when the order status is 'PENDING' because changes are no longer supported for cancelled or confirmed orders.
Parameters:
Parameter | Value |
|---|---|
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
(orderItems/productOrderLines) id | orderline ID |
(orderItems) product | Only for 'regular' offers and 'group' offers with 'group tickets'. |
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
groups | Only for 'group' offers. |
productOrderLines | Only for 'group' offers with 'individual tickets'. |
visitor | This is optional. |
gender | 0 = UNKNOWN (default) 1 = MALE 2 = FEMALE |
Possible error codes
Code | Message |
|---|---|
1001 | <field_name> is required. |
1003 | <field_name> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/0/rebook");
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", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/orders/0/rebook")
.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("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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/directsellingapi/v3/orders/0/rebook");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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", "/v3/orders/0/rebook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"status": "string",
"hasPendingRebook": "boolean",
"pricing": {
"subTotal": "decimal",
"discount": "decimal",
"cost": "decimal",
"total": "decimal"
},
"language": "string",
"createdOn": "date",
"lastUpdatedOn": "date",
"orderItems": [
{
"id": "number",
"quantity": "number",
"unitPrice": "decimal",
"visitDate": "date",
"timeSlot": {
"id": "number",
"start": "2025-06-25T08:45:00",
"end": "2025-06-25T09:45:00"
},
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "number",
"vatRate": "number"
},
"guideLanguage": "string",
"offer": {
"id": "number",
"name": "string",
"type": "number",
"imageUrl": "string",
"frequencyType": "3",
"ticketType": null,
"eventId": 64127,
"startDate": "2024-04-14 18:30:00",
"endDate": "2029-12-31 18:29:59"
},
"pricing": {
"subTotal": "decimal",
"discount": "decimal",
"cost": "decimal",
"total": "decimal"
},
"groups": [],
"productOrderLines": [],
"passes": [
{
"id": "H202580624Q0759HFGV",
"isScanned": false,
"createdOn": "2025-06-24T07:56:20",
"externalCode": null
}
]
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalCode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": "number",
"dateOfBirth": "date",
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string",
"newsletterOptIn": "boolean"
},
"links": [
{
"rel": "self",
"href": "string",
"method": "GET"
},
{
"rel": "cancel",
"href": "string",
"method": "DELETE"
}
],
"discountSources": [],
"salesPoint": {
"id": "number",
"name": "string",
"channelType": "number"
}
}[
{
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number",
"errors": [
{
"message": "string",
"code": "number"
}
]
}
]{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-ddTHH:mm:ssZ Example: fromdate=2022-01-01T00:00:00Z NoteThe date range (fromdate - todate) can not exceed the maximum of 31 days. All date and time data in the API request/response are passed in UTC-00:00 format. |
todate | date | true | The to date to fetch orders for. Format: yyyy-MM-ddTHH:mm:ssZ Example: todate=2022-01-31T23:59:59Z NoteThe date range (fromdate - todate) can not exceed the maximum of 31 days. All date and time data in the API request/response are passed in UTC-00:00 format. |
type | string | false | For Direct selling API version 3.2 only type=Rebook supported, if not provided then also it will return Rebook operations. Example: type=rebook |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/operations");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/orders/operations")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/orders/operations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/orders/operations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"type": "string",
"orderId": "number",
"offerId": "number",
"oldTimeslotId": "number",
"timeslotId": "number",
"timestamp": "datetime"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The ID of the order. |
Name | Type | Required | Description |
|---|---|---|---|
paymentType | string | false | The defined type of payment to be created. It can be either of the two:
Default: DropIn |
expiresOn | date | false | The payment expiry date. If not set, then the default values will be used. The maximum custom expiry for a payment of type 'PayByLink' is 14 days. The maximum custom expiry for a payment of type 'DropIn' is 30 minutes. |
returnUri | string | false | The URL to return to after the payment concludes. This is only applicable for payments of type 'DropIn' |
When payment for the order is needed
Success response code: 200 OK
When the order is in a state where a payment won't be needed
Success response code: 204 No Content
Example: If an order is in a 'Confirmed' state and the order has no payment or its payment is already finalised, then it is NoContent.
Response body on success:
No response body
401 Unauthorized error response
The error response code 422 Unprocessable Entity will be returned if the order has no visitor information associated with it, and thus insufficient information is present to create a payment.
Parameters
Parameter | Description |
|---|---|
paymentSession | This is optional. |
paymentLink | This is optional. |
expiresOn | This is optional and is empty for a free payment. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/0/payment");
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", "{\"returnUri\":\"https://api.staging-enviso.io/directsellingapi\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/orders/0/payment")
.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("{\"returnUri\":\"https://api.staging-enviso.io/directsellingapi\"}")
.asString();
const data = "{\"returnUri\":\"https://api.staging-enviso.io/directsellingapi\"}";
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/directsellingapi/v3/orders/0/payment");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"returnUri\":\"https://api.staging-enviso.io/directsellingapi\"}"
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", "/v3/orders/0/payment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"reference": "string",
"paymentSession": "string",
"paymentLink": "string",
"expiresOn": "date",
"amount": "number"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: /orders/28149 |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | The language code in which the pass details should be returned. Default: en Eg: language=nl |
Success response code: 200 OK
Parameter
Parameter | Value/Description |
|---|---|
status |
|
format |
|
link | Only if the status is 'Generated'. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/orders/0/passesfile");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/orders/0/passesfile")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/orders/0/passesfile");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/orders/0/passesfile", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"status": "string",
"format": "string",
"link": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Default = en |
includePerTicketFields | boolean | false | Display formfields for per-ticket forms. |
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get more detailed information about the offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/forms/default/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/forms/default/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/forms/default/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/forms/default/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number"
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"validations": [
{
"type": "string",
"error": "string"
}
],
"perTicket": "boolean"
},
{
"id": "number",
"name": "string",
"type": "text",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
}
],
"validations": [
{
"type": "string",
"error": "string"
}
],
"perTicket": "boolean"
},
{
"id": "number"
"name": "string",
"type": "string",
"label": "string",
"sortOrder": "string.",
"validations": [
{
"type": "string",
"error": "string"
},
],
"perTicket": "boolean"
}
]
{
"errors": [
{
"message": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the form. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | false | Language for fields. Eg: /07c632c6-7e3b-4eca-b6bf-e8c792b0fc2f/fields?language=en |
includePerTicketFields | boolean | false | Display formfields for per-ticket forms. Eg: /07c632c6-7e3b-4eca-b6bf-e8c792b0fc2f/fields?includePerTicketFields=false |
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get formid linked with an offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/forms/string/fields");
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);
HttpResponse<String> response = deUnirest.get("https://api.staging-enviso.io/directsellingapi/v3/forms/string/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v3/forms/string/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/forms/string/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"validations": [
{
"type": "email",
"error": "Invalid email address"
}
],
"perTicket": "boolean"
},
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
}
],
"validations": [
{
"type": "string",
"error": "string"
}
],
"perTicket": "boolean"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 200 OK
Response parameter
Parameter | Description |
|---|---|
isoCode | The official ISO-4217 three-letter ("Alpha-3") currency code. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/venues/self");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/venues/self")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/venues/self");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/venues/self", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"description": "string",
"logoImageUrl": "string",
"address": {
"addressLine1": "string",
"addressLine2": "string",
"locality": "string",
"postalCode": "string",
"country": "string"
},
"googleLocation": {
"latitude": "decimal",
"longitude": "decimal"
},
"website": "string",
"facebook": "string",
"twitter": "string",
"linkedin": "string",
"instagram": "string",
"coverImageUrl": "string",
"currency": {
"isoCode": "EUR",
"symbol": "€",
"format": "-1.234.567.890,11 €"
}
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate | datetime | false | Filter sales using from date Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2021-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | datetime | false | Filter sales using the end date Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2021-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
page | number | false | The start page number for the range to show in the result set. If omitted, the first page of the results will be returned. Default = 0 Note
|
perpage | number | false | The number of results per page. If omitted, the default page size will be used. Default = 50 Note
|
only-include-product-sales-lines | boolean | false | Whether or not to return all sales-lines or only the product sales-lines of the sales. The default value is 'true', so that we do not break any integrations. However, integrators should set the value to 'false' immediately. They should handle the added Default = true Eg: only-include-product-sales-lines=true |
skiprebook | boolean | false | Whether or not to skip rebook sales. Default: skiprebook=true NoteThe default value is true therefore it does not break any integrations. However, integrators should set this to false immediately. The 'SaleType' enum property should be handled in the saleDto. |
Success response code: 200 OK
Enums
SalesType | Value |
|---|---|
OrderConfirmed | 0 |
Cancellation | 1 |
Rebook | 2 |
SalesLineType | Value |
|---|---|
Product | 0 |
ServiceFee | 1 |
Response header
Response header | |
|---|---|
link |
|
Possible error codes
Code | Message |
|---|---|
1004 |
|
1012 |
Eg: perpage must be between 1 and 50. |
9023 | The provided value for field_name must be passed in field_format format. Eg: The provided value for fromdate must be passed in yyyy-MM-ddTHH:mm:ssZ format. |
9024 | From date must be less than To date |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/sales");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/sales")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/sales");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/sales", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"saleType": "number",
"externalId": "number",
"orderNumber": "string",
"payment": {
"method": "string",
"reference": "stringt"
},
"discount": {
"code": "number",
"codes": [],
"amount": "decimal"
},
"cancellationFee": "decimal",
"salesLines": [
{
"discountAmount": "decimal",
"barcodes": [
{
"id": "decimal",
"barcode": "string",
"externalCode": "number",
"scanned": "boolean",
"valid": "boolean",
"numberOfVisitors": "number",
"validFrom": "2025-06-25T00:00:00",
"validTill": "2025-06-25T23:59:59",
"createdOn": "2025-06-24T02:43:35Z",
"visitorData": {}
},
],
"visitDate": "2025-06-25T00:00:00",
"vatRate": "decimal",
"ledgerAccount": {
"name": "string",
"number": "number"
},
"productGroup": {
"name": "string"
},
"id": "number",
"productId": "number",
"productName": "string",
"eventId": "number",
"offerId": "number",
"offerName": "string",
"timeSlotId": "string",
"unitPrice": "decimal",
"quantity": "number",
"amount": "decimal",
"createdOn": "2025-06-24T02:43:36Z",
"orderLineId": "number",
"commissionType": "number",
"commissionRate": "decimal",
"commissionAmount": "decimal",
"salesLineType": "number",
"offerType": "string"
}
],
"cost": "decimal",
"visitorData": {
},
"id": "number",
"createdOn": "2025-06-24T02:43:36Z",
"amount": "decimal",
"salesChannelType": "number",
"partner": "string",
"salesPoint": {
"id": "number",
"name": "string",
"channelType": "number"
},
"orderId": "number",
"links": [
{
"href": "string",
"rel": "self",
"method": "GET"
}
],
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"categoryCommissionAmount": "decimal",
"commissionType": "number"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the sale. |
Name | Type | Required | Description |
|---|---|---|---|
only-include-product-sales-lines | boolean | false | Whether or not to return all sales-lines or only the product sales-lines of the sales. The default value is 'true', so that we do not break any integrations. However, integrators should set the value to 'false' immediately. They should handle the added Default = true Eg: only-include-product-sales-lines=true |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/sales/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");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/sales/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.asString();
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/directsellingapi/v3/sales/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string"
}
conn.request("GET", "/v3/sales/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"saleType": "number",
"externalId": "number",
"orderNumber": "string",
"payment": {
"method": "string",
"reference": "stringt"
},
"discount": {
"code": "number",
"codes": [],
"amount": "decimal"
},
"cancellationFee": "decimal",
"salesLines": [
{
"discountAmount": "decimal",
"barcodes": [
{
"id": "decimal",
"barcode": "string",
"externalCode": "number",
"scanned": "boolean",
"valid": "boolean",
"numberOfVisitors": "number",
"validFrom": "2025-06-25T00:00:00",
"validTill": "2025-06-25T23:59:59",
"createdOn": "2025-06-24T02:43:35Z",
"visitorData": {}
},
],
"visitDate": "2025-06-25T00:00:00",
"vatRate": "decimal",
"ledgerAccount": {
"name": "string",
"number": "number"
},
"productGroup": {
"name": "string"
},
"id": "number",
"productId": "number",
"productName": "string",
"eventId": "number",
"offerId": "number",
"offerName": "string",
"timeSlotId": "string",
"unitPrice": "decimal",
"quantity": "number",
"amount": "decimal",
"createdOn": "2025-06-24T02:43:36Z",
"orderLineId": "number",
"commissionType": "number",
"commissionRate": "decimal",
"commissionAmount": "decimal",
"salesLineType": "number",
"offerType": "string"
}
],
"cost": "decimal",
"visitorData": {
},
"id": "number",
"createdOn": "2025-06-24T02:43:36Z",
"amount": "decimal",
"salesChannelType": "number",
"partner": "string",
"salesPoint": {
"id": "number",
"name": "string",
"channelType": "number"
},
"orderId": "number",
"links": [
{
"href": "string",
"rel": "self",
"method": "GET"
}
],
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"categoryCommissionAmount": "decimal",
"commissionType": "number"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
All requests for this resource will be executed as a logged-in visitor.
An additional request header called 'x-visitor-token' (of type 'string') is required for all the requests. This should contain the JWT acquired using the Enviso Auth API (/v1/visitor/exchange-token). Further documentation on how to obtain this JWT can be found in the Enviso Auth API documentation.
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the visitor. Eg: /visitor/21/activate |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/0/activate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/0/activate")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/0/activate");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/0/activate", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the visitor. Eg: /visitor/21/deactivate |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/0/deactivate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/0/deactivate")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/0/deactivate");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/0/deactivate", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 200OK
imageURL: The link provided is a CDN link. It is publicly accessible and does not require authentication.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/memberships");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/memberships")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/memberships");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/memberships", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"name": "string",
"productName": "string",
"membershipHolderName": "string",
"validFrom": "date",
"validTill": "date",
"imageUrl": "string",
"orderId": "number"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
This endpoint is obsolete. Please refer to the image URL added under links in the response of the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
offerid | number | true | The unique identifier of the offer. Eg: /visitor/offers/123/images/912aa510-c595-4fca-97cd-319f7ff7dff1.jpeg |
imagekey | string | true | The unique identifier of the offer image. Eg: /visitor/offers/123/images/912aa510-c595-4fca-97cd-319f7ff7dff1.jpeg |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/offers/0/images/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "image/png");
request.AddHeader("Authorization", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/offers/0/images/string")
.header("Accept", "image/png")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/offers/0/images/string");
xhr.setRequestHeader("Accept", "image/png");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "image/png",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"value": null,
"formatters": [
{}
],
"contentTypes": [
"string"
],
"declaredType": "string",
"statusCode": 0
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
fromdate & todate | date | false | The from date to fetch orders for. Format: yyyy-MM-ddTHH:mm:ssZ NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
todate | date | false | The to date to fetch orders for. Format: yyyy-MM-ddTHH:mm:ssZ NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
visitfromdate & visittodate | date | false | The from date of the visit of the orders you would like to receive. Format: yyyy-MM-ddTHH:mm:ssZ NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
visittodate | date | false | The to date of the visit of the orders you would like to receive. Format: yyyy-MM-ddTHH:mm:ssZ NoteAll date and time data in the API request/response are passed in UTC-00:00 format. |
page | integer | false | The page of the order-list you want to receive Eg: page=1 |
perpage | integer | false | The number of orders to receive per page. Default value: 50 Eg: perpage=25 |
searchfieldname | string | false | A string that is used to query results containing the given string in at least one of the following fields.
|
orderby | string | false | A string to sort the orders. You can sort by any of the below fields.
After the given sort field, you can specify the direction. This is either ASC or DESC. Eg: orderby=createdon DESC |
searchfieldvalue | string (int,int,int) | false | A string that is used to query the actual result within the
Default value: 1,2,3 Eg: status=0 |
Request headers:
An additional request header called x-visitor-token is required. This should contain the JWT acquired using the Enviso Authentication API documentation (/v3/visitor/exchange-token).
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/orders", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"status": "number",
"id": "number",
"number": "string",
"amount": "number",
"createdOn": "date",
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"salesPointId": "number",
"isRefundable": "boolean",
"hasPendingRebook": "boolean"
}
]
{
"errors": [
{
"message": "string",
"trace": "string"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | long | true | The unique identifier of the order. Eg: visitor/orders/56/ |
Request headers:
An additional request header called x-visitor-token is required. This should contain the JWT acquired using the Enviso Authentication API documentation (/v1/visitor/exchange-token).
The JWT should not be prefixed with 'Bearer'. The raw token should be passed in this x-visitor-token header.
Success response code: 200 OK
Parameters:
Parameter | Value |
|---|---|
barcodeGenerationStrategy |
|
imageUrl | The link provided is a CDN link. It is publicly accessible and does not require authentication. |
status | 1 = Confirmed 2 = Cancelled 3 = Reserved |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders/0");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/orders/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"number": "string",
"createdOn": "date",
"orderItems": [
{
"id": "number",
"unitPrice": "number",
"vatRate": "number",
"quantity": "number",
"totalPrice": "number",
"visitDate": "string",
"timeSlotId": "number",
"startTime": "string",
"endTime": "string",
"product": {
"offer": {
"type": "number",
"offerType": "number",
"frequencyType": "number",
"barcodeGenerationStrategy" : "string",
"id": "number",
"eventId": "number",
"name": "string",
"description": "string",
"imageUrl": "string"
},
"startDate": "date",
"endDate": "date"
},
"id": "number",
"name": "string",
"price": "number",
"productId": "number"
},
"guideLanguage": "string",
"ticketBarcodes": [
{
"barcodeFormat": "string",
"barcodeString": "string",
"barcode": "string",
"creationDate": "date",
"isScanned": "boolean"
}
],
"amount": "number",
"visitorGroups": [
{
"numberOfVisitors": "number"
}
],
"validFrom": "date",
"validTill": "date",
"isRebookable": "boolean",
"isCancelable": "boolean",
"voucherPassId": "string",
"voucherUnitPrice": "number",
"pricing": {
"subTotal": decimal,
"total": decimal,
"discount": decimal,
"cost": decimal
},
}
],
"payment": {
"method": "string",
"otherMethodName": "string",
"amount": {
"currency": "string",
"value": "number"
},
"referenceId": "string",
"isRefundable": "boolean"
},
"hasPendingRebook": "boolean",
"status": "number",
"currencyInfo": {
"currencySymbol": "string",
"isoCurrencySymbol": "string"
},
"pricing": {
"subTotal": decimal,
"total": decimal,
"discount": decimal,
"cost": decimal
},
}
{
"errors": [
{
"message": "string",
"trace": "string"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/56 |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID which is linked with the order. Eg: salespointid=21 |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/cancel");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/cancel")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders/0/cancel");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/orders/0/cancel", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/28149 |
Name | Type | Required | Description |
|---|---|---|---|
language | string | true | The language code in which the pass details should be returned. Default: en Eg: language=nl |
Success response code: 200 OK
Enum values
Parameter | Value/Description |
|---|---|
status |
|
format |
|
link | Only if the status is 'Generated'. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/passes/link");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/passes/link")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders/0/passes/link");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/orders/0/passes/link", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"status": "string",
"format": "string",
"link": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. Eg: visitor/orders/56 |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID on which you want to get the order detail. Eg: salespointid=21 |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":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/directsellingapi/v3/visitor/orders/0/rebook");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/orders/0/rebook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Success response code: 200 OK
Enum value
Parameter | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/relations");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/relations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"customerId": "number",
"type": "string",
"firstName": "string",
"lastName": "string",
"active": "boolean",
"birthDate": "date",
"pictureUrl": "string"
}
]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 201 Created
Enum value
Parameter | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}")
.asString();
const data = "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"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/directsellingapi/v3/visitor/relations");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"type\":\"Other\",\"firstName\":\"string\",\"lastName\":\"string\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\"}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/visitor/relations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"customerId": "number",
"type": "string",
"firstName": "string",
"lastName": "string",
"active": "boolean",
"birthDate": "2015-01-01T00:00:00Z",
"pictureUrl": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the relation. Eg: /visitor/relations/56 |
Success response code: 204 No Content
Enum value
Parameter | Value |
|---|---|
type |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations/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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/relations/0")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}")
.asString();
const data = "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":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/directsellingapi/v3/visitor/relations/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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"type\":\"Other\",\"birthDate\":\"2019-08-24T14:15:22Z\",\"newPictureData\":\"string\",\"removePicture\":true}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/relations/0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/userprofile");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/userprofile")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/userprofile");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/userprofile", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"firstName": "string",
"lastName": "string",
"email": "string",
"language": "string",
"country": "string",
"pictureUrl": "string"
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/userprofile");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v3/visitor/userprofile")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}")
.asString();
const data = "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":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/directsellingapi/v3/visitor/userprofile");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"language\":\"string\",\"country\":\"string\",\"newPictureData\":\"string\",\"removePicture\":true}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("PUT", "/v3/visitor/userprofile", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Property | Type | Required | Description |
|---|---|---|---|
PassIds | string array | false | PassIds are the same as the barcodes present in sales data (returned on order confirmation) Eg: EOPF2D3438D8XD8S, EOUI2IL035M9QKZ6, EOZX2KW6379220EI
|
Success response code: 200 OK
Response parameters
Parameter | Description |
|---|---|
offerId | This is an optional parameter. |
currentTimeSlotId | This is an optional parameter. |
newTimeSlotId | This is an optional parameter. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/initiate");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"passIds\":[]}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/initiate")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"passIds\":[]}]}")
.asString();
const data = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"passIds\":[]}]}";
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/directsellingapi/v3/visitor/orders/0/rebook/initiate");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"offerId\":0,\"currentTimeSlotId\":0,\"newTimeSlotId\":0,\"passIds\":[]}]}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/visitor/orders/0/rebook/initiate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"paymentAmount": "decimal",
"expiresOn": "date"
}
{
"errors": [
{
"message": "string",
"code": "number",
"offerId": "number",
"currentTimeSlotId": "number",
"newTimeSlotId": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/confirm");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("application/json-patch+json", "{\"payment\":{\"amount\":0,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/confirm")
.header("Content-Type", "application/json-patch+json")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.body("{\"payment\":{\"amount\":0,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = "{\"payment\":{\"amount\":0,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"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/directsellingapi/v3/visitor/orders/0/rebook/confirm");
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-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":0,\"currency\":\"string\",\"reference\":\"string\",\"method\":\"string\"}}"
headers = {
'Content-Type': "application/json-patch+json",
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/visitor/orders/0/rebook/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the order. |
Success response code: 204 No Content
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/cancel");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/0/rebook/cancel")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders/0/rebook/cancel");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v3/visitor/orders/0/rebook/cancel", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [{
"message": "string",
"code": "number"
}]
}
Name | Type | Required | Description |
|---|---|---|---|
scanned | bool | false | Possible values are:
Eg: scanned=true |
page | number | false | The page of the passes you want to receive. Default: 0 Eg: page=2 NoteThere may be several pages. Therefore, we recommend fetching pages until an empty page is returned. |
fromdate | date | true | Filter offer from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2023-09-01T00:00:00Z |
todate | date | true | Filter offer end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2023-09-31T23:59:59Z NoteThe date range can be a maximum of 13 months. |
perpage | number | false | The number of passes you want to receive per page. Default: 50 Eg: perpage=10 |
passtype | string | false | The type of passes you want to receive. Possible values are:
Eg: passtype=ticket |
language | string | false | The language code in which the pass details should be returned. Default: en Eg: language=en |
Success response code: 200 OK
Response parameters
Parameter | Description |
|---|---|
isCancelled | If the pass is cancelled, returns true else false. |
validity | Shows pass validity. |
dateOfFirstVisit | If a pass is scanned, then the scanned date of the pass will return, else null. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/passes");
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-visitor-token", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v3/visitor/orders/passes")
.header("Accept", "text/plain")
.header("Authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-visitor-token", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v3/visitor/orders/passes");
xhr.setRequestHeader("Accept", "text/plain");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-visitor-token", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "text/plain",
'Authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-visitor-token': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v3/visitor/orders/passes", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"passType": "string",
"passId": "string",
"offerName": "string",
"productName": "string",
"isCancelled": "boolean",
"validity": {
"validFrom": "dateTime",
"validTill": "dateTime"
},
"offerId": "number",
"productId": "number",
"dateOfFirstVisit": "string",
"orderNumber": "string",
"redeemOrderId": "number",
"redeemOrderNumber": "string",
"orderId": "number",
"visitorEmail": "string",
"isScanned": "boolean",
"createdOn": "2025-06-09T03:22:08Z",
"externalCode": "number",
"passbookKey": "string"
}]
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
This section contains the notable changes in the Direct selling API.
The link provided in the response of the endpoints List offers, Get offer detail, and Get memberships is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
For the endpoints List offers and Get offer detail, the link relation type for image is now a CDN link.
These endpoints are obsolete - Get offer image (Offers) and Get offer image (Visitors).
Added OrderId property to visitor Get order passes endpoint.
Added passes to the order detail response for the endpoint Get order detail
Added IsScanned property to barcodes in the visitor order detail response for the endpoint Get order details.
Added HasPendingRebook property to visitor order overview for the endpoint Get orders.
Added ExpiresOn property on visitor rebook initiate. Also, changed the rebook expiry from 2 hours to 2 days.
Updated description of visitor rebook cancellation. Open payments can now be cancelled.
Updated order payment operation to allow payments with a pay-by-link for the endpoint Initiate payment for order. Also, added HTTP 401 Unauthorized error response.
Added description of product to the offer detail response for the endpoint Get offer detail.
Added description of product to the offer translation response for the endpoint Get offer translations.
Remove salespoint id requirement and parameter from fetching order details from the endpoints Get order detail and Get order details.
Updated the Initiate drop-in payment session for order endpoint.
Added the amount property on the 200 OK response.
Added HTTP 204 response.
Added visitor rebook initiate endpoint
Added visitor confirm rebook endpoint
Added visitor cancel rebook endpoint
Added the SaleType field and SkipRebook query filter for the sales endpoint.
Added new endpoint Get order passes to get the passes of orders.
Added a new endpoint Get offer translations to fetch translations of a specific offer.
Added new endpoints Add discount code to basket and Remove discount code from basket.
Added a new endpoint List prices to retrieve all the prices for the products of an offer over a period of time.
Added a new endpoint List prices for a single day to retrieve the price for each time slot of an offer for a single day.
Added a new field lastUpdatedOn for the endpoints List offers and Get offer detail. These endpoints now include the last modification date in the response.
Added a new query parameter updatedsince to the endpoint List offers
Added a new field guideLanguages to the endpoint Get offer detail.
Added a new field offerType for the endpoints List sales and Get sale detail.
Added the query parameter only-include-product-sales-lines to the endpoints List sales and Get sale detail.
Added a new endpoint for initiating a drop-in payment based on order.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is now obsolete.
Changed reservation and order endpoints to work with the basket system in Enviso. Includes support for the group and guided offers.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is obsolete.
Initial version
The Direct selling API v2 will be replaced by Direct selling API v3 in the future. We recommend using Direct selling API v3.
The Direct selling API allows you to retrieve offers that are published to a specific sales point on the direct sales channel, and sell products related to the offer. This API is mainly used for selling products through direct sales channels such as cash registers, self-service kiosks or websites.
All information that passes through the Direct selling API is stored in Enviso.
In the context of using the Direct selling API, here's a short description of what certain terminologies imply.
Venue | A venue is an organisation unit that registers on the enviso sales application for selling their tickets through one or more sales channels (direct or indirect). |
Organisation | An organisation is the overarching term that is used for bundling multiple venue units. In this case, multiple venue units are part of one organisation. |
Sales point | A sales point is a physical or virtual location where orders can occur and sales can be made. Eg: Cash register (physical) or Web shop (virtual) |
Product | A product is a sell-able thing. In the context of the Direct selling API this can be referred to as a ticket. Eg: Adult safari ticket is referred to as a product. NoteResult of a product sale is a ticket barcode. |
Offer | An offer is a bundle of Product(s) made available for selling. Eg: An offer could consist of Adult safari ticket. While another offer could consist of two products, Adult safari ticket and Child safari ticket. |
Capacity | Capacity refers to the restriction on the number of visitors for an offer. Capacity types are per day, per slot and total. |
Reservation | A reservation is a temporary reserved product. When a reservation is created, the total capacity is reduced with the number of products that are reserved. By default, the reservation time is 30 minutes. This means that if a reservation is not confirmed within 30 minutes, the system will automatically expire the reservation and add the reserved number of products to the total capacity again. |
Basket | A basket is a bundle of temporarily reserved products. When the first reservation is created, a basket is automatically created as well. A basket can be altered by adding new reservations, editing existing reservations or removing reservations from the basket. |
Order | An order is the result of a basket checkout. When a basket is ready to be paid, then we can checkout the basket which will result in a new order. This is necessary to take the end-user to the payment step. |
Sale | A sale is the result of a paid order. When an order is paid, it results in a sale that contains links to both the order and the related payment details. |

Search products (offers)
The Direct selling API returns the offers which are published to the corresponding direct channel sales point. Every offer contains one or more products which can be sold.
Eg.: "Entrance to the museum" can be an offer where "Child ticket" & "Adult ticket" are it's products.
Create reservation
Create a reservation for a product. The needed capacity will be reserved for a temporary amount of time (by default 30 minutes).
Eg.: A family decides to visit the museum and wants to buy 2 "Adult tickets" and 1 "Child ticket". For this 2 reservations are needed.
The creation of your first reservation will automatically create a new basket to which new reservations can be added or existing reservations can be removed or altered.
Checkout order
Checkout the basket containing all the reservations to create an order which can be paid.
Once the order is created, the capacity is now reserved for a longer amount of time to make sure that the end user has time to finalize his payment.
Eg.: Both reservations are part of the same basket, so the basket containing 2 reservations from the previous step are bundled into a single order.
Pay (confirm) order
The visitor pays the order (= confirms the order) and as a result the corresponding sales are created in Enviso.
Eg.: The payment for the order that was created in previous step has been approved. By confirming the order, the sales are created in Enviso and the tickets (with barcodes or QR codes) are generated.
The following image shows a high-level overview of the domain model for the Direct Selling API.

The Direct selling API is a REST API solution and attempts to conform to the RESTful design principles.
Throughout the document, {version} stands for the first digit of the version in use.
Eg: If you are using version 2.0, {version} would mean v2
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)
The following HTTP status codes are used within the Direct selling 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 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. NoteIt is recommended to make modifications in 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 request 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. |
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_tokenCode | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field> must not exceed <field_max> characters. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
1012 | <field> must be between <field_min> and <field_max>. |
1013 | <field> must not be in the past. |
4004 | Order ID <field_identifier> is not valid. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4012 | Reservations should occur per offer. |
4013 | Reservation ID <field_identifier> has expired. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4021 | Timeslot ID is not in the offer period. |
4022 | Visit date cannot be in the past. |
4023 | Visit date is not in the offer period. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4091 | Duplicate Reservation ID found. |
4092 | A maximum of 25 tickets can be added at a time. |
4093 | A maximum of total 100 tickets can be added at a time in an order. |
4098 | The entity could not be saved. |
4101 | One or more products not found. |
4102 | Reservations should occur per offer. |
4103 | One or more reservations not found. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
4107 |
|
4014 | Reservation <field_identifier> is already confirmed. You can't create order for already confirmed reservation. |
4018 |
|
4019 | Product ID <field_identifier> cannot be reserved as the offer has expired. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4123 | Order should occur per offer. |
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 Direct selling API.
For this, you'll need to use the Authentication API.
When going from the staging/testing 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 Direct selling API
Change the base URL to the production environment https://api.enviso.io/directsellingapi
Contact Vintia support to get your production environment keys.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | Filter offer using from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2018-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | Filter offer using end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2018-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
searchcolumns | string | false | Filter offers by a certain field. For now, it is only possible to filter on offer name.
|
searchterm | string | false | Filter offers using the provided search term.
|
page | integer | false | Start page number for the range to show in the result set. If omitted, the first page of results will be returned.
|
perpage | integer | false | Number of results per page. If omitted, the default page size will be used.
|
Success response code: 200 OK
Link relationship types:
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer | GET |
|
image | Get the offer image NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | GET |
Possible error codes
Code | Message |
|---|---|
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1012 | <field> must be between <field_min> and <field_max>. |
9023 | The provided value for <field> must be passed in <field_format> format. |
9024 | From date must be less than To date |
9025 | Sales Point ID <field_identifier> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/string/offers");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/string/offers")
.header("Accept", "application/json")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v2/salespoints/string/offers");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'x-tenantsecretkey': "string",
'Authorization': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/string/offers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offers": [
{
"offer": {
"id": 0,
"name": "string",
"description": "string",
"start": "2020-10-15T06:45:15.915Z",
"end": "2020-10-15T06:45:15.915Z",
"type": "string", // Regular | Group
},
"links": [
{
"rel": "item",
"href": "url_to_offer_detail"
},
{"rel": "image",
"href": "url_to_offer_image"
}
]
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Success response code: 200 OK
Parameters
Parameter | Description |
|---|---|
eventId | Value will be available only for offers linked to an event. |
groupSize | Value will be available only for group offers. |
frequency |
|
ticketType |
Value will be available only for group offers. |
minimumGroupSize | It may have value only for group offers. |
Link relationship types
Relationship | Description | URL |
|---|---|---|
self | Get the detailed information about the offer |
|
image | Get the offer image NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | |
capacity | Get single offer capacity (in total, for 1 day or for 1 slot) |
|
capacities | Get the offer capacities in bulk |
|
timeslots | Get the offer time slots (when time slots are used) |
|
reserve | Reserve an offer product |
|
Possible errors
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/salespoints/0/offers/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/0/offers/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offer": {
"id": "number",
"name": "string",
"type": "number",
"description": "string",
"start": "2020-10-09T08:43:43.227Z",
"end": "2020-10-09T08:43:43.227Z",
"eventId": "number",
"groupSize": "number",
"capacity": {
"frequency": "string",
"amount": "number"
},
"products": [
{
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "number"
},
"links": []
}
],
"ticketType": "string",
"minimumGroupSize": "number",
"lastUpdatedOn": "2025-03-31T14:01:28",
"guideLanguages": ["string"],
"tags": ["string"]
},
"links": [
{
"rel": "self",
"href": "url_to_offer_detail"
},
{
"rel": "image",
"href": "url_to_offer_image"},
},
{
"rel": "capacity",
"href": "url_to_offer_capacity"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve time slots for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | The from date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | The to date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
capacity | Get the capacity for the timeslot |
|
offer | Get the detailed information about the offer |
|
Possible error code
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/timeslots");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/timeslots")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/salespoints/0/offers/0/timeslots");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/0/offers/0/timeslots", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeslots": [
{
"timeslot": {
"id": 0,
"start": "2020-10-09T08:54:29.956Z",
"end": "2020-10-09T08:54:29.956Z"
},
"links": [
{
"rel": "capacity",
"href": "url_to_offer_capacity"
}
]
}
],
"links": [
{
"rel": "offer",
"href": "url_to_offer_detail"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
This endpoint is obsolete. Please refer to the image URL added under links in the response of the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
imagekey | string | true | The unique key of the image. |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/offers/0/images/string");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/offers/0/images/string")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/offers/0/images/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"value": {},
"formatters": [
{}
],
"contentTypes": [
"string"
],
"declaredType": "string",
"statusCode": 0
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
id | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
date | date | false | The date to retrieve offer capacity for. Only to be used for offers with PERDAY capacity. Format: yyyy-MM-dd |
timeslotid | integer | false | The time slot to retrieve offer capacity for. Only to be used for offers with PERSLOT capacity. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
allocatedCapacity (limited) |
|
|
|
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible errors
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
1013 | <field> must not be in the past. |
4006 | Timeslot ID is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/capacity");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/capacity")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/salespoints/0/offers/0/capacity");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/0/offers/0/capacity", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
For Total offer
{
"frequency": "string",
"capacity": {
"quantity": "number"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per day offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"date": "2025-06-23T00:00:00"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per slot offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-30T11:00:00",
"end": "2025-06-30T12:00:00"
}
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | The from date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | The to date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Parameters
Parameter | Description |
|---|---|
frequency |
|
totalQuantity | This parameter will only show for per slot offers. |
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/capacities");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/capacities")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/salespoints/0/offers/0/capacities");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/0/offers/0/capacities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"frequency": "string",
"capacities": [
{
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-29T11:00:00",
"end": "2025-06-29T12:00:00"
},
"totalQuantity": "number"
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"frequency": "string",
"capacities": [
{
"quantity": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the sales point. Offers will be included in the result set only when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: fromdate=2019-01-01 |
todate | date | true | The to date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: todate=2019-01-31 |
quantity | integer | false | The ticket quantity to fetch the available days for. Default value: 1 Days will only be included in the result set when:
|
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/availabledays");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/salespoints/0/offers/0/availabledays")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/salespoints/0/offers/0/availabledays");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/salespoints/0/offers/0/availabledays", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"availableDays": [
"2025-06-30T00:00:00"
],
"capacityPerDay": [
{
"day": "2025-06-29T00:00:00",
"availability": {
"available": "number",
"total": "number"
}
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
Success response code: 200 OK
Link relationship types
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer | GET |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/offers/string/metadata");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/offers/string/metadata")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v2/offers/string/metadata");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/offers/string/metadata", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"languagesOffered": ["string"],
"visitDuration": "00:00:00",
"cutOffDuration": "number",
"formId": "number",
"guideRequired": "boolean",
"guideSkills": ["string"]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | number | true | The sales point ID on which you want to create a basket. |
Success response code: 200 OK
Parameter
Parameter | Description |
|---|---|
cost | Cost is available for group offers. For other offer types, the value will be null. Cost is the service fee. |
Response parameters per capacity type
Depending on the frequency, the content of the request body should be different:
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
productId |
|
|
|
quantity |
|
|
|
visitDate |
|
|
|
timeslotId |
|
|
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v2/baskets")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]")
.asString();
const data = JSON.stringify([
{
"productId": 0,
"quantity": 0,
"visitDate": "2019-08-24T14:15:22Z",
"timeSlotId": 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/directsellingapi/v2/baskets");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v2/baskets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"expireOn": "2025-06-19T08:51:10Z",
"discountCodes": [],
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"reservations": [
{
"id": "number",
"productId": "number",
"offerId": "number",
"timeSlot": {
"id": "number",
"from": "2025-12-06T06:30:00Z",
"start": "2025-12-06T06:30:00Z",
"to": "2025-12-06T07:35:00Z",
"end": "2025-12-06T07:35:00Z"
},
"quantity": "number",
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"groups": ["number"]
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/baskets/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.asString();
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/directsellingapi/v2/baskets/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("GET", "/v2/baskets/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"salesPoint": {
"id": "number",
"channelType": "string",
"type": "string"
},
"reservations": [
{
"id": "number",
"offerId": "string",
"reservationTimeLength": "00:30:00",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
}
}
],
"ticketReservations": [
{
"id": "number",
"offerId": "number",
"reservationTimeLength": "00:30:00",
"productReservations": [
{
"id": "number",
"product": {
"id": "number",
"name": "string",
"unitPrice": "number",
"originalUnitPrice": "number"
},
"numberOfVisitors": {},
"numberOfTickets": {},
"capacityInfo": {
"timeslotCapacities": []
},
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"visitors": "number"
}
],
"slot": {
"id": "number",
"from": "2025-12-06T06:30:00+00:00",
"to": "2025-12-06T07:35:00+00:00"
},
"visit": {
"totalVisitors": {},
"takenCapacity": {}
},
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"isEmpty": false
}
],
"membershipReservations": [],
"voucherReservations": [],
"products": [
{
"id": "number",
"name": "string",
"unitPrice": "number",
"originalUnitPrice": "number"
}
],
"updatedOn": "2025-06-20T09:07:31+00:00",
"expireOn": "2025-06-20T09:37:31+00:00",
"hasExpired": "boolean",
"hasCheckoutInProgress": "booolean",
"timeToLive": "2025-06-20T09:37:31+00:00",
"originalPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"version": "number",
"discountCodes": [],
"discountSources": [],
"reservationTimeLength": "00:30:00",
"isEmpty": "boolean",
"jobId": "number",
"hasLinkedExpirationJob": "boolean",
"containsVoucherRedeem": "boolean"
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
reservationid | number | true | The ID of the reservation |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations/string");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "{\"id\":0,\"quantity\":0}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations/string")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("{\"id\":0,\"quantity\":0}")
.asString();
const data = JSON.stringify({
"id": 0,
"quantity": 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/directsellingapi/v2/baskets/string/reservations/string");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"id\":0,\"quantity\":0}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("PUT", "/v2/baskets/string/reservations/string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"expireOn": "2020-10-14T19:25:32.059Z",
"discountCodes": "string",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"reservations": [
{
"id": "number",
"productId": "number",
"offerId": "number",
"timeSlot": {
"id": "number",
"from": "2025-12-06T06:30:00Z",
"start": "2020-10-14T19:25:32.059Z",
"to": "2025-12-06T07:35:00Z",
"end": "2020-10-14T19:25:32.059Z"
},
"quantity": "number", // when reserving a group offer with group tickets, this is the number of visitors
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"groups": []
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
reservationid | number | true | The ID of the reservation |
Success response code: 200 OK (No response)
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.asString();
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/directsellingapi/v2/baskets/string/reservations/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("DELETE", "/v2/baskets/string/reservations/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket |
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the request body should be different:
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
productId |
|
|
|
quantity |
|
|
|
visitDate |
|
|
|
timeslotId |
|
|
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/reservations")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]")
.asString();
const data = JSON.stringify([
{
"productId": 0,
"quantity": 0,
"visitDate": "2019-08-24T14:15:22Z",
"timeSlotId": 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/directsellingapi/v2/baskets/string/reservations");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v2/baskets/string/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"expireOn": "2020-10-14T19:54:40.037Z",
"discountCodes": [
"string"
],
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"reservations": [
{
"id": "number",
"productId": "number",
"offerId": "number",
"quantity": "number", // if the reservation is of group offer then the quantity will be in number of groups
"unitPrice": "number",
"pricing": {
"subtotal": "number",
"discount": "number",
"total": "number",
"cost": "number"
},
"groups": []
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | GUID | true | The ID of the basket. |
Name | Type | Required | Description |
|---|---|---|---|
language | string | true | The two-letter language code of the visitor Eg: fr |
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/checkout");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddParameter("undefined", "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v2/baskets/string/checkout")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.body("{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}")
.asString();
const data = JSON.stringify({
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": 0,
"dateOfBirth": "2019-08-24",
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string"
},
"formIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
});
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/directsellingapi/v2/baskets/string/checkout");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string"
}
conn.request("POST", "/v2/baskets/string/checkout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"amount": "number",
"number": "number"
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to cancel. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to cancel an order. |
Success response code: 204 No Content
Possible errors
Code | Message |
|---|---|
1003 | <field> must be greater than 0. |
4004 | Order ID <field_identifier> is not valid. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/orders/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v2/orders/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v2/orders/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("DELETE", "/v2/orders/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order you want to confirm. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to confirm the order. |
sendemail | boolean | false | Indicates whether an e-mail with the tickets should be sent to the visitor. Default value: False |
Success response code: 200 OK
Link relationship types
Relationship | Description | Method | Format |
|---|---|---|---|
item | Gets the order detail | GET |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field_name> must not exceed <field_max> characters. |
4004 | Order ID <field_identifier> is not valid. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/orders/string/confirm");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("origin", "string");
request.AddHeader("x-api-key", "API_KEY");
request.AddParameter("undefined", "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v2/orders/string/confirm")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.body("{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}")
.asString();
const data = JSON.stringify({
"payment": {
"amount": {
"currency": "string",
"value": 0
},
"reference": "string",
"method": "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/directsellingapi/v2/orders/string/confirm");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"payment\":{\"amount\":{\"currency\":\"string\",\"value\":0},\"reference\":\"string\",\"method\":\"string\"}}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-tenantsecretkey': "string",
'Authorization': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("POST", "/v2/orders/string/confirm", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"order": {
"id": 0,
"number": "string",
"amount": 0,
"links": [
{
"rel": "string",
"href": "string"
}
]
},
"sale": {
"id": 0,
"creationDate": "2020-10-15T05:57:47.401Z",
"amount": 0,
"salesPoint": {
"id": 0,
"name": "string"
},
"lines": [
{
"id": 0,
"productId": 0,
"eventId": 0,
"timeSlotId": 0,
"unitPrice": 0,
"quantity": 0,
"amount": 0,
"creationDate": "2020-10-15T05:57:47.401Z",
"orderLineId": 0,
"barcodes": [
{
"barcode": "string",
"creationDate": "2020-10-15T05:57:47.401Z"
}
]
}
]
}
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to get the order detail. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
confirm | Confirms an order |
|
cancel | Cancels an order |
|
The links are only available when the order status is 'PENDING' as changes are not longer supported for cancelled or confirmed orders.
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/orders/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/orders/string")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v2/orders/string");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/orders/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"order": {
"id": 0,
"number": "string",
"amount": 0,
"status": 1, // 1 = Confirmed, 2 = Cancelled, 3 = Reserved
"orderItems": [
{
"id": 0,
"quantity": 0,
"amount": 0,
"visitDate": "2020-10-15T06:07:08.590Z",
"timeSlotId": 0,
"product": {
"id": 0,
"name": "string",
"price": 0
}
}
],
"visitor": { // Optional
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": 0, // 0 = UNKNOWN (default), 1 = MALE, 2 = FEMALE
"dateOfBirth": "2020-10-15",
"newsletterOptIn": "boolean"
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string"
},
"links": [
{
"rel": "update",
"href": "url_to_update_order"
}
{
"rel": "confirm",
"href": "url_to_confirm_order"
}
{
"rel": "cancel",
"href": "url_to_cancel_order"
}
]
}
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get more detailed information about the offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/forms/default/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/forms/default/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/forms/default/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/forms/default/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
}
],
"validations": [
{
"type": "string",
"error": "string"
}
]
},
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"validations": [
{
"type": "string",
"error": "string"
},
{
"type": "string",
"error": "string",
"value": "number"
},
{
"type": "string",
"error": "string"
},
{
"type": "string",
"error": "string"
}
],
"perTicket": "boolean"
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the form. |
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get formid linked with an offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/forms/string/fields");
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);
HttpResponse<String> response = deUnirest.get("https://api.staging-enviso.io/directsellingapi/v2/forms/string/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v2/forms/string/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/forms/string/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
},
{
"text": "string",
"value": "string"
},
{
"text": "string",
"value": "string"
},
{
"text": "string",
"value": "string"
}
],
"perTicket": "boolean"
},
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"validations": [
{
"type": "string",
"error": "string"
},
{
"type": "string",
"error": "string",
"value": "number"
}
]
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Success response code: 200 OK
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v2/venues/self");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("origin", "string");
request.AddHeader("x-tenantsecretkey", "string");
request.AddHeader("Authorization", "string");
request.AddHeader("x-api-key", "API_KEY");
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v2/venues/self")
.header("Accept", "application/json")
.header("origin", "string")
.header("x-tenantsecretkey", "string")
.header("Authorization", "string")
.header("x-api-key", "API_KEY")
.asString();
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/directsellingapi/v2/venues/self");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("origin", "string");
xhr.setRequestHeader("x-tenantsecretkey", "string");
xhr.setRequestHeader("Authorization", "string");
xhr.setRequestHeader("x-api-key", "API_KEY");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'Accept': "application/json",
'origin': "string",
'x-tenantsecretkey': "string",
'Authorization': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v2/venues/self", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"name": "string",
"description": "string",
"logoImageUrl": "string",
"address": {
"addressLine1": "string",
"addressLine2": "string",
"locality": "string",
"postalCode": "string",
"country": "string"
},
"googleLocation": {
"latitude": 0,
"longitude": 0
},
"website": "string",
"facebook": "string",
"twitter": "string",
"linkedin": "string",
"coverImageUrl": "string",
"currency": {
"isoCode": "string",
"symbol": "string",
"format": "₹1,23,45,67,890.11"
}
}
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
This section contains the notable changes in the Direct selling API.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is now obsolete.
Changed reservation and order endpoints to work with the basket system in Enviso. Includes support for the group and guided offers.
The link provided in the response of the endpoints List offers and Get offer detail is a CDN link for the offer image. This link is publicly accessible and does not require authentication.
The endpoint Get offer image is obsolete.
Initial version
The Direct selling API v1 will be replaced by Direct selling API v3 in the future. We recommend using Direct selling API v3.
The Direct selling API allows you to retrieve offers that are published to a specific sales point on the direct sales channel and sell it's related products. This API is mainly used for selling products through direct sales channels such as cash registers, self-service kiosks or websites.
All information that passes the Direct selling API is stored in Enviso.
In the context of using the Direct selling API, here's a short description of what certain terminologies imply.
Venue | A venue is an organisation unit that registers on the enviso sales application for selling their tickets through one or more sales channels (direct or indirect). |
Organisation | An organisation is the overarching term that is used for bundling multiple venue units. In this case, multiple venue units are part of one organisation. |
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 sell-able thing. In the context of the Direct selling API this can be referred to as a ticket. Example: Adult safari ticket is referred to as a product. NoteResult of a product sale is a ticket barcode. |
Offer | An offer is a bundle of Product(s) made available for selling. |
Capacity | Capacity refers to the restriction on the number of visitors for an offer. Capacity types are per day, per slot and total. |
Reservation | A reservation is a temporary reserved product. When a reservation is created, the total capacity is reduced with the number of products that are reserved. By default, the reservation time is 30 minutes. This means that if a reservation is not confirmed within 30 minutes, the system will automatically expire the reservation and add the reserved number of products to the total capacity again. |
Order | An order is a bundle of one or multiple reservations. |
Sale | A sale is the result of a paid order. When an order is paid, it results in a sale that contains links to both the order and the related payment details. |

Search products (offers)
The Direct selling API returns the offers which are published to the corresponding direct channel sales point. Every offer contains one or more products which can be sold.
Eg.: "Entrance to the museum" can be an offer where "Child ticket" & "Adult ticket" are it's products.
Create reservation
Create a reservation for a product. The needed capacity will be reserved for a temporary amount of time (by default 30 minutes).
Eg.: A family decides to visit the museum and wants to buy 2 "Adult tickets" and 1 "Child ticket". For this 2 reservations are needed.
Create order
Bundle all temporary reservations into an order which can be paid.
Once the order is created, the capacity is now reserved for a longer amount of time.
Eg.: Both reservations will be bought into a single transaction, so the 2 reservations from the previous step are bundled into a single order.
Pay (confirm) order
The visitor pays the order (= confirms the order) and as a result the corresponding sales are created in Enviso.
Eg.: The payment for the order that was created in previous step has been approved. By confirming the order, the sales are created in enviso and the tickets (with barcodes or QR codes) are generated.
The following image shows a high level overview of the domain model for the Direct Selling API.

The Direct selling API is a REST API solution and attempts to conform to the RESTful design principles.
Throughout the document, {version} stands for the first digit of the version in use.
Eg: If you are using the version 1.1, {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)
The following HTTP status codes are used within the Direct selling 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 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. TipIt is recommended to make modifications in 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. TipIf 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. TipThis 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. TipThe 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 request 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. |
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
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field> must not exceed <field_max> characters. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
1012 | <field> must be between <field_min> and <field_max>. |
1013 | <field> must not be in the past. |
4004 | Order ID <field_identifier> is not valid. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4012 | Reservations should occur per offer. |
4013 | Reservation ID <field_identifier> has expired. |
4016 | Order is already cancelled. |
4019 | Order is already confirmed. |
4020 | Order is already cancelled and it cannot be confirmed. |
4021 | Timeslot ID is not in the offer period. |
4022 | Visit date cannot be in the past. |
4023 | Visit date is not in the offer period. |
4079 | Order cannot be confirmed as the visit date has elapsed for the offer. |
4091 | Duplicate Reservation ID found. |
4092 | A maximum of 25 tickets can be added at a time. |
4093 | A maximum of total 100 tickets can be added at a time in an order. |
4098 | The entity could not be saved. |
4101 | One or more products not found. |
4102 | Reservations should occur per offer. |
4103 | One or more reservations not found. |
4105 | One or more reservations not found. |
4106 | The provided paid amount does not match the order amount. |
4107 |
|
4014 | Reservation <field_identifier> is already confirmed. You can't create order for already confirmed reservation. |
4018 |
|
4019 | Product ID <field_identifier> cannot be reserved as the offer has expired. |
4111 | Orders cannot be cancelled within 2 hours of placing them. |
4123 | Order should occur per offer. |
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 Direct selling API.
For this, you'll need to use the Authentication API.
When going from the staging/testing 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 Direct selling API
Change the base URL to the production environment https://api.enviso.io/directsellingapi
Contact Vintia support to get your production environment keys.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | Filter offer using from date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2018-01-20T00:00:00Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | Filter offer using end date. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2018-01-20T23:59:59Z NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
searchcolumns | string | false | Filter offers by a certain field. For now, it is only possible to filter on offer name.
|
searchterm | string | false | Filter offers using the provided search term.
|
page | integer | false | Start page number for the range to show in the result set. If omitted, the first page of results will be returned.
|
perpage | integer | false | Number of results per page. If omitted, the default page size will be used.
|
Success response code: 200 OK
Link relationship types:
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer. | GET |
|
image | Get the offer image. NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | GET |
Possible error codes:
Code | Message |
|---|---|
1004 | <field> must be greater than or equal to zero. |
1005 | The provided value for <field> is not valid. |
1012 | <field> must be between <field_min> and <field_max>. |
9023 | The provided value for <field> must be passed in <field_format> format. |
9024 | From date must be less than To date |
9025 | Sales Point ID <field_identifier> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offers": [
{
"offer": {
"id": 0,
"name": "string",
"description": "string",
"start": "2020-10-09T05:52:45.746Z",
"end": "2020-10-09T05:52:45.746Z"
},
"links": [
{
"rel": "string",
"href": "string"
}
]
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offers for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Success response code: 200 OK
Parameters
Parameter | Description |
|---|---|
eventId | Value will be available only for offers linked to an event. |
groupSize | Value will be available only for group offers. |
frequency |
|
ticketType |
Value will be available only for group offers. |
minimumGroupSize | It may have value only for group offers. |
Link relationship types:
Relationship | Description | URL |
|---|---|---|
self | Get the detailed information about the offer |
|
image | Get the offer image NoteThe offer image link provided is a CDN link. It is publicly accessible and does not require authentication. | |
capacity | Get single offer capacity (in total, for 1 day or for 1 slot) |
|
capacities | Get the offer capacities in bulk |
|
timeslots | Get the offer time slots (when time slots are used) |
|
reserve | Reserve an offer product |
|
Possible errors
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"offer": {
"id": "number",
"name": "string",
"type": "number",
"description": "string",
"start": "2020-10-09T08:43:43.227Z",
"end": "2020-10-09T08:43:43.227Z",
"eventId": "number",
"groupSize": "number",
"capacity": {
"frequency": "string",
"amount": "number"
},
"products": [
{
"product": {
"id": "number",
"name": "string",
"description": "string",
"price": "number"
},
"links": []
}
],
"ticketType": "string",
"minimumGroupSize": "number",
"lastUpdatedOn": "2025-03-31T14:01:28",
"guideLanguages": ["string"],
"tags": ["string"]
},
"links": [
{
"rel": "self",
"href": "url_to_offer_detail"
},
{
"rel": "image",
"href": "url_to_offer_image"},
},
{
"rel": "capacity",
"href": "url_to_offer_capacity"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve time slots for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | false | The from date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | false | The to date to fetch time slots for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
capacity | Get the capacity for the timeslot |
|
offer | Get the detailed information about the offer |
|
Possible error code
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/timeslots");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/timeslots")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers/0/timeslots");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers/0/timeslots", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"timeslots": [
{
"timeslot": {
"id": 0,
"start": "2020-10-09T08:54:29.956Z",
"end": "2020-10-09T08:54:29.956Z"
},
"links": [
{
"rel": "string",
"href": "string"
}
]
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
This endpoint is obsolete. Please refer to the image URL added under links in the response of the endpoints List offers and Get offer detail for the image CDN link.
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
imagekey | string | true | The unique key of the image. |
Success response code: 200 OK
Response body on success: The image corresponding to the specified image key.
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/offers/0/images/string");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/offers/0/images/string")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/offers/0/images/string");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/offers/0/images/string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"value": {},
"formatters": [
{}
],
"contentTypes": [
"string"
],
"declaredType": "string",
"statusCode": 0
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
date | date | false | The date to retrieve offer capacity for. Only to be used for offers with PERDAY capacity. Format: yyyy-MM-dd |
timeslotid | integer | false | The time slot to retrieve offer capacity for. Only to be used for offers with PERSLOT capacity. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= Included in the response
= Not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity |
|
|
|
date |
|
|
|
timeslot |
|
|
|
allocatedCapacity (limited) |
|
|
|
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible errors
Code | Message |
|---|---|
1005 | The provided value for <field> is not valid. |
1013 | <field> must not be in the past. |
4006 | Timeslot ID is not valid. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/capacity");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/capacity")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers/0/capacity");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers/0/capacity", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
For Total offer
{
"frequency": "string",
"capacity": {
"quantity": "number"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per day offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"date": "2025-06-23T00:00:00"
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
For Per slot offer
{
"frequency": "string",
"capacity": {
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-30T11:00:00",
"end": "2025-06-30T12:00:00"
}
},
"allocatedCapacity": "number",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The sales point ID to retrieve offer capacity for. Offers will only be included in the result set when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date-time | true | The from date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: fromdate=2019-01-01T00:00:00 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
todate | date-time | true | The to date to fetch capacity for. Date range (fromdate - todate) can not exceed the maximum of 31 days. Format: yyyy-MM-ddTHH:mm:ssZ Eg: todate=2019-01-31T23:59:59 NoteAll date and time data in the API request passed/response received are in the UTC-00:00 format. |
You can directly use the visit date (without any date conversion) to fetch capacity as well as to reserve ticket quantity for offers that are of the capacity type PERDAY.
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
quantity | ![]() | ![]() | ![]() |
date | ![]() | ![]() | ![]() |
timeslot | ![]() | ![]() | ![]() |
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Parameters
Parameter | Description |
|---|---|
frequency |
|
totalQuantity | This parameter will only show for per slot offers. |
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/capacities");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/capacities")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers/0/capacities");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers/0/capacities", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"frequency": "string",
"capacities": [
{
"quantity": "number",
"timeslot": {
"id": "number",
"start": "2025-06-29T11:00:00",
"end": "2025-06-29T12:00:00"
},
"totalQuantity": "number"
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"code": "number"
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the sales point. Offers will be included in the result set only when they are published to this sales point. |
offerid | integer | true | The unique identifier of the offer. |
Name | Type | Required | Description |
|---|---|---|---|
fromdate | date | true | The from date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: fromdate=2019-01-01 |
todate | date | true | The to date to fetch capacity for. Format: yyyy-MM-dd Date range (fromdate - todate) can not exceed the maximum of 31 days. Eg: todate=2019-01-31 |
quantity | integer | false | The ticket quantity to fetch the available days for. Default value: 1 Days will only be included in the result set when:
|
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
offer | Get the detailed information about the offer |
|
Possible error codes
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
1010 | The provided date range can not be in the past. |
1011 | The provided date range can not exceed more than 31 days. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/availabledays");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/salespoints/0/offers/0/availabledays")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/salespoints/0/offers/0/availabledays");
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);
import http.client
conn = http.client.HTTPSConnection("")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/salespoints/0/offers/0/availabledays", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"availableDays": [
"2025-06-29T00:00:00",
"2025-06-30T00:00:00"
],
"capacityPerDay": [
{
"day": "2025-06-29T00:00:00",
"availability": {
"available": "number",
"total": "number"
}
}
],
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the offer. |
Success response code: 200 OK
Link relation type
Relationship | Description | Method | Format |
|---|---|---|---|
item | Get more detailed information about the offer | GET |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/offers/0/metadata");
var request = new RestRequest(Method.OPTIONS);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.options("https://api.staging-enviso.io/directsellingapi/v1/offers/0/metadata")
.asString();
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("OPTIONS", "https://api.staging-enviso.io/directsellingapi/v1/offers/0/metadata");
xhr.send(data);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi/")
conn.request("OPTIONS", "/v1/offers/0/metadata")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": "number",
"languagesOffered": ["string"],
"visitDuration": "string",
"cutOffDuration": "string",
"formId": "string",
"guideRequired": "string",
"guideSkills": ["string"]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The unique identifier of the sales point. |
Success response code: 200 OK
Response parameters per capacity type
Depending on the frequency, the content of the 'capacities' object will be different:
= included in the response
= not included in the response
Parameter | TOTAL | PERDAY | PERSLOT |
|---|---|---|---|
productid | ![]() | ![]() | ![]() |
quantity | ![]() | ![]() | ![]() |
date | ![]() | ![]() | ![]() |
timeslotid | ![]() | ![]() | ![]() |
Link relationship types
Relationship | Description | URL |
|---|---|---|
update | Update a reservation |
|
delete | Delete a reservation |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1005 | The provided value for <field> is not valid. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4021 | Timeslot ID is not in the offer period. |
4022 | Visit date cannot be in the past. |
4023 | Visit date is not in the offer period. |
4092 | A maximum of 25 tickets can be added at a time. |
4098 | The entity could not be saved. |
4101 | One or more products not found. |
4102 | Reservations should occur per offer. |
4107 |
|
4108 |
|
4109 | Product ID <field_identifier> cannot be reserved as the offer has expired. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/reservations");
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", "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v1/reservations")
.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("[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]")
.asString();
var data = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"timeSlotId\":0}]";
var 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/directsellingapi/v1/reservations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"productId\":0,\"quantity\":0,\"visitDate\":\"2019-08-24T14:15:22Z\",\"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("POST", "/v1/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": 0,
"expirationDate": "2020-10-09T10:53:26.210Z",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | false | The sales point ID on which you want to edit a reservation. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
update | Update a reservation |
|
delete | Delete a reservation |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
4006 | Timeslot ID is not valid. |
4007 | Timeslot ID cannot be in the past. |
4008 | Tickets are not available in the requested quantity. |
4011 | Product ID <field_identifier> cannot be reserved as the offer period has elapsed. |
4013 | Reservation ID <field_identifier> has expired. |
4022 | Visit date cannot be in the past. |
4092 | A maximum of 25 tickets can be added at a time. |
4098 | The entity could not be saved. |
4102 | Reservations should occur per offer. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/reservations");
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,\"quantity\":0}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.put("https://api.staging-enviso.io/directsellingapi/v1/reservations")
.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,\"quantity\":0}]")
.asString();
var data = "[{\"id\":0,\"quantity\":0}]";
var 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/directsellingapi/v1/reservations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "[{\"id\":0,\"quantity\":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/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": 0,
"expirationDate": "2020-10-09T10:57:36.596Z",
"links": [
{
"rel": "string",
"href": "string"
}
]
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to delete the reservation(s). |
Success response code: 202 Accepted
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1005 | The provided value for <field> is not valid. |
4012 | Reservations should occur per offer. |
4013 | One or more reservations not found. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/reservations");
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", "{\"reservationIds\":[0]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.delete("https://api.staging-enviso.io/directsellingapi/v1/reservations")
.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("{\"reservationIds\":[0]}")
.asString();
var data = "{\"reservationIds\":[0]}";
var 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/directsellingapi/v1/reservations");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"reservationIds\":[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/reservations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to delete the reservation(s). |
Gender parameter values
Parameter | Value |
|---|---|
Unknown | 0 |
Male | 1 |
Female | 2 |
Success response code: 201 Created
Link relationship types
Relationship | Description | URL |
|---|---|---|
item | Gets the order detail |
|
confirm | Confirms an order |
|
cancel | Cancels an order |
|
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
1005 | The provided value for <field> is not valid. |
1006 | Please enter a valid email address. |
1008 | <field> must not exceed <field_max> characters. |
4013 | Reservation ID <field_identifier> has expired. |
4091 | Duplicate Reservation ID found. |
4092 | A maximum of 25 tickets can be added at a time. |
4093 | A maximum of total 100 tickets can be added at a time in an order. |
4014 | Reservation <field_identifier> is already confirmed. You can't create order for already confirmed reservation. |
4103 | One or more reservations not found. |
4123 | Order should occur per offer. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/orders");
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", "{\"orderItems\":[{\"reservationId\":0}],\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formId\":\"string\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
HttpResponse<String> response = Unirest.post("https://api.staging-enviso.io/directsellingapi/v1/orders")
.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("{\"orderItems\":[{\"reservationId\":0}],\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formId\":\"string\"}")
.asString();
var data = "{\"orderItems\":[{\"reservationId\":0}],\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formId\":\"string\"}";
var 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/directsellingapi/v1/orders");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
payload = "{\"orderItems\":[{\"reservationId\":0}],\"visitor\":{\"firstName\":\"string\",\"lastName\":\"string\",\"email\":\"string\",\"address\":{\"country\":\"string\",\"city\":\"string\",\"postalcode\":\"string\",\"street\":\"string\",\"number\":\"string\"},\"phone\":\"string\",\"gender\":0,\"dateOfBirth\":\"2019-08-24\",\"reasonForVisit\":\"string\",\"remarks\":\"string\",\"emailOfFinanceDivision\":\"string\",\"schoolName\":\"string\",\"groupName\":\"string\",\"ageRange\":\"string\"},\"formId\":\"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/orders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"id": 0,
"number": "string",
"amount": 0,
"links": [
{
"rel": "string",
"href": "string"
}
]
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | integer | true | The unique identifier of the order. |
Name | Type | Required | Description |
|---|---|---|---|
salespointid | integer | true | The sales point ID on which you want to get the order detail. |
Success response code: 200 OK
Link relationship types
Relationship | Description | URL |
|---|---|---|
confirm | Confirms an order |
|
cancel | Cancels an order |
|
The links are only available when the order status is 'PENDING' as changes are no longer supported for cancelled or confirmed orders.
Possible errors
Code | Message |
|---|---|
1001 | <field> is required. |
1003 | <field> must be greater than 0. |
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/orders/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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/orders/0")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/orders/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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/orders/0", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"order": {
"id": 0,
"number": "string",
"amount": 0,
"status": 1,
"orderItems": [
{
"id": 0,
"quantity": 0,
"amount": 0,
"visitDate": "2020-10-09T11:18:12.154Z",
"timeSlotId": 0,
"product": {
"id": 0,
"name": "string",
"price": 0
}
}
],
"visitor": {
"firstName": "string",
"lastName": "string",
"email": "string",
"address": {
"country": "string",
"city": "string",
"postalcode": "string",
"street": "string",
"number": "string"
},
"phone": "string",
"gender": 0,
"dateOfBirth": "2020-10-09",
"reasonForVisit": "string",
"remarks": "string",
"emailOfFinanceDivision": "string",
"schoolName": "string",
"groupName": "string",
"ageRange": "string"
},
"links": [
{
"rel": "string",
"href": "string"
}
]
}
}
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get more detailed information about the offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/forms/default/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/forms/default/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/forms/default/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/forms/default/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}
Name | Type | Required | Description |
|---|---|---|---|
id | number | true | The unique identifier of the form. |
Success response code: 200 OK
Link relationship type
Relationship | Description | URL |
|---|---|---|
item | Get formid linked with an offer |
|
var client = new RestClient("https://api.staging-enviso.io/directsellingapi/v1/forms/string/fields");
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);
HttpResponse<String> response = Unirest.get("https://api.staging-enviso.io/directsellingapi/v1/forms/string/fields")
.header("accept", "text/plain")
.header("authorization", "string")
.header("x-tenantsecretkey", "string")
.header("origin", "string")
.header("x-api-key", "API_KEY")
.asString();
var data = null;
var 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/directsellingapi/v1/forms/string/fields");
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);
import http.client
conn = http.client.HTTPSConnection("https://api.staging-enviso.io/directsellingapi")
headers = {
'accept': "text/plain",
'authorization': "string",
'x-tenantsecretkey': "string",
'origin': "string",
'x-api-key': "API_KEY"
}
conn.request("GET", "/v1/forms/string/fields", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
[
{
"id": "number",
"name": "string",
"type": "string",
"label": "string",
"infoText": "string",
"sortOrder": "number",
"items": [
{
"text": "string",
"value": "string"
}
]
{
"errors": [
{
"message": "string",
"propertyName": "string",
"code": 0
}
]
}