| Requires any of the roles: | Admin, TenantAdmin, MarketplaceAdmin |
| POST | /service | Inserts a new service. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OrganizationId | body | string | Yes | Organization Id (GUID) |
| ServiceType | body | ServiceType | Yes | Service type (reservation, request, external)Allowable Values
|
| Image | body | ImageDto | No | Image object for setting image name, content and mime type. |
| Name | body | string | Yes | Service name |
| Description | body | string | No | Service description |
| SubTitle | body | string | No | Sub title intended to end up under the service title in the app. |
| IsPublic | body | boolean | No | Value indicating whether the service is public or private (default private) |
| RequireConfirmation | body | boolean | No | Value indicating whether the reservation has to be confirmed before it can be actualized. |
| RequirePayment | body | boolean | No | Value indicating whether a payment should be completed before the service can be reserved. |
| CurrencyId | body | string | No | Currency Id (GUID) |
| VATPercentage | body | integer | No | VAT percentage for each proddcut and addon in the service. |
| PaymentProviderConfigId | body | string | No | Payment provider Id (GUID) |
| InvoicingProviderConfigId | body | string | No | Invoicing provider Id (GUID) |
| Products | body | List<ServiceProductDto> | Yes | List of service products. |
| Addons | body | List<ServiceAddonDto> | No | List of service addons. |
| TimeOption | body | ServiceTimeOptionDto | No | Time & date configuration options. |
| PersonOption | body | ServicePersonOptionDto | No | Person configuration options for a service. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Value |
|---|---|
| Reservation | 1 |
| Request | 2 |
| External | 3 |
| Ticket | 4 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| FileName | form | string | No | |
| Content | form | string | No | |
| MimeType | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| Name | form | string | No | |
| Description | form | string | No | |
| UnitPrice | form | decimal? | No | |
| VATPercentage | form | decimal? | No | |
| Image | form | ImageDto | No | |
| ExternalId | form | string | No | |
| ReservationData | form | ServiceProductReservationDto | No | |
| RequestData | form | ServiceProductRequestDto | No | |
| ExternalData | form | ServiceProductExternalDto | No | |
| TicketData | form | ServiceProductTicketDto | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| AccessTemplateGroupId | form | Guid? | No | |
| AccessTemplateId | form | Guid? | No | |
| AutoAssignAccessTemplate | form | bool? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| Options | form | List<string> | No | |
| AllowComments | form | bool | No | |
| ApprovedTemplate | form | string | No | |
| DeniedTemplate | form | string | No | |
| ProcessingTemplate | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| ServiceUrl | form | string | No | |
| Latitude | form | decimal? | No | |
| Longitude | form | decimal? | No | |
| Rating | form | decimal? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| AccessTemplateId | form | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| Name | form | string | No | |
| UnitPrice | form | decimal? | No | |
| VATPercentage | form | decimal? | No | |
| MaxQuantity | form | int? | No | |
| ExternalId | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| Type | form | ServiceTimeOptionType | No | |
| DailyOptions | form | TimeDailyDto | No | |
| TimespanOptions | form | TimespanDto | No |
| Name | Value |
|---|---|
| Daily | 0 |
| Timespan | 1 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Checkin | form | TimeSpan? | No | |
| Checkout | form | TimeSpan? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| MinDuration | form | int | No | |
| MaxDuration | form | int | No | |
| Increment | form | int? | No | |
| IncrementPriceMultiplier | form | decimal? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| CanSelectChildren | form | bool | No | |
| MaxAdultCount | form | int? | No | |
| MaxChildrenCount | form | int? | No | |
| AdultPriceMultiplier | form | decimal | No | |
| ChildPriceMultiplier | form | decimal | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | ServiceView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| OrganizationId | form | Guid | No | |
| ServiceType | form | ServiceType | No | |
| Name | form | string | No | |
| Description | form | string | No | |
| SubTitle | form | string | No | |
| ImageUrl | form | string | No | |
| IsPublic | form | bool | No | |
| RequireConfirmation | form | bool? | No | |
| RequirePayment | form | bool? | No | |
| Latitude | form | decimal? | No | |
| Longitude | form | decimal? | No | |
| Currency | form | CurrencyDto | No | |
| VATPercentage | form | decimal? | No | |
| Products | form | List<ServiceProductView> | No | |
| Addons | form | List<ServiceAddonDto> | No | |
| TimeOption | form | ServiceTimeOptionDto | No | |
| PersonOption | form | ServicePersonOptionDto | No | |
| Providers | form | Dictionary<string, Guid> | No | |
| Organization | form | OrganizationDto | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| Code | form | string | No | |
| Symbol | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| Description | form | string | No | |
| UnitPrice | form | decimal? | No | |
| MinimalPrice | form | decimal? | No | |
| VATPercentage | form | decimal? | No | |
| ImageUrl | form | string | No | |
| ExternalId | form | List<string> | No | |
| ReservationData | form | ServiceProductReservationDto | No | |
| RequestData | form | ServiceProductRequestDto | No | |
| ExternalData | form | ServiceProductExternalDto | No | |
| TicketData | form | ServiceProductTicketDto | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| Code | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /service HTTP/1.1
Host: api.4spaces.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
organizationId: 00000000000000000000000000000000,
serviceType: 1,
image:
{
fileName: String,
content: String,
mimeType: String
},
name: String,
description: String,
subTitle: String,
isPublic: False,
requireConfirmation: False,
requirePayment: False,
currencyId: 00000000000000000000000000000000,
vatPercentage: 0,
paymentProviderConfigId: 00000000000000000000000000000000,
invoicingProviderConfigId: 00000000000000000000000000000000,
products:
[
{
id: 00000000000000000000000000000000,
name: String,
description: String,
unitPrice: 0,
vatPercentage: 0,
image:
{
fileName: String,
content: String,
mimeType: String
},
externalId: String,
reservationData:
{
id: 00000000000000000000000000000000,
accessTemplateGroupId: 00000000000000000000000000000000,
accessTemplateId: 00000000000000000000000000000000,
autoAssignAccessTemplate: False
},
requestData:
{
id: 00000000000000000000000000000000,
options:
[
String
],
allowComments: False,
approvedTemplate: String,
deniedTemplate: String,
processingTemplate: String
},
externalData:
{
id: 00000000000000000000000000000000,
serviceUrl: String,
latitude: 0,
longitude: 0,
rating: 0
},
ticketData:
{
id: 00000000000000000000000000000000,
accessTemplateId: 00000000000000000000000000000000
}
}
],
addons:
[
{
id: 00000000000000000000000000000000,
name: String,
unitPrice: 0,
vatPercentage: 0,
maxQuantity: 0,
externalId: String
}
],
timeOption:
{
id: 00000000000000000000000000000000,
type: 0,
dailyOptions:
{
checkin: PT0S,
checkout: PT0S
},
timespanOptions:
{
minDuration: 0,
maxDuration: 0,
increment: 0,
incrementPriceMultiplier: 0
}
},
personOption:
{
id: 00000000000000000000000000000000,
canSelectChildren: False,
maxAdultCount: 0,
maxChildrenCount: 0,
adultPriceMultiplier: 0,
childPriceMultiplier: 0
},
version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
data:
{
id: 00000000000000000000000000000000,
organizationId: 00000000000000000000000000000000,
serviceType: 1,
name: String,
description: String,
subTitle: String,
imageUrl: String,
isPublic: False,
requireConfirmation: False,
requirePayment: False,
latitude: 0,
longitude: 0,
currency:
{
id: 00000000000000000000000000000000,
name: String,
code: String,
symbol: String
},
vatPercentage: 0,
products:
[
{
id: 00000000000000000000000000000000,
name: String,
description: String,
unitPrice: 0,
minimalPrice: 0,
vatPercentage: 0,
imageUrl: String,
externalId:
[
String
],
reservationData:
{
id: 00000000000000000000000000000000,
accessTemplateGroupId: 00000000000000000000000000000000,
accessTemplateId: 00000000000000000000000000000000,
autoAssignAccessTemplate: False
},
requestData:
{
id: 00000000000000000000000000000000,
options:
[
String
],
allowComments: False,
approvedTemplate: String,
deniedTemplate: String,
processingTemplate: String
},
externalData:
{
id: 00000000000000000000000000000000,
serviceUrl: String,
latitude: 0,
longitude: 0,
rating: 0
},
ticketData:
{
id: 00000000000000000000000000000000,
accessTemplateId: 00000000000000000000000000000000
}
}
],
addons:
[
{
id: 00000000000000000000000000000000,
name: String,
unitPrice: 0,
vatPercentage: 0,
maxQuantity: 0,
externalId: String
}
],
timeOption:
{
id: 00000000000000000000000000000000,
type: 0,
dailyOptions:
{
checkin: PT0S,
checkout: PT0S
},
timespanOptions:
{
minDuration: 0,
maxDuration: 0,
increment: 0,
incrementPriceMultiplier: 0
}
},
personOption:
{
id: 00000000000000000000000000000000,
canSelectChildren: False,
maxAdultCount: 0,
maxChildrenCount: 0,
adultPriceMultiplier: 0,
childPriceMultiplier: 0
},
providers:
{
String: 00000000000000000000000000000000
},
organization:
{
id: 00000000000000000000000000000000,
code: String
}
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}