BokaMera.API.Host

<back to all web services

ApproveBooking

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/bookings/{Id}/approveApprove a booking that is reserved and awaiting approvalUpdates an existing booking with approved status if you are authorized to do so.
System.NullReferenceException: Object reference not set to an instance of an object.
   at ServiceStack.ServiceStackHost.TryResolve[T]() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/ServiceStackHost.cs:line 1539
   at ServiceStack.RequestExtensions.TryResolveInternal[T](IRequest request) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/RequestExtensions.cs:line 274
   at ServiceStack.Host.NetCore.NetCoreRequest.TryResolve[T]() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Host/NetCore/NetCoreRequest.cs:line 55
   at ServiceStack.ContainerExtensions.Resolve[T](IResolver container) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack.Common/SimpleContainer.cs:line 119
   at ServiceStack.NativeTypes.LangGeneratorExtensions.GenerateSourceCode(List`1 metadataTypes, String lang, IRequest req, Action`1 configure) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/NativeTypes/ILangGenerator.cs:line 26
   at ServiceStack.Metadata.BaseMetadataHandler.ProcessOperationsAsync(Stream writer, IRequest httpReq, IResponse httpRes) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Metadata/BaseMetadataHandler.cs:line 208

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /bookings/{Id}/approve HTTP/1.1 
Host: api.bookmore.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyId: 00000000-0000-0000-0000-000000000000,
	Id: 0,
	PaymentOption: DefaultSetting,
	Comment: String,
	Message: String,
	SendSmsConfirmation: False,
	SendEmailConfirmation: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	Status: Booked,
	StatusId: 0,
	StatusName: String,
	StatusInfo: 
	{
		Id: 0,
		Name: String,
		Description: String,
		Icon: String,
		Color: String
	},
	SendEmailReminder: False,
	SendSmsReminder: False,
	SendSmsConfirmation: False,
	SendEmailConfirmation: False,
	LastTimeToUnBook: "0001-01-01T00:00:00",
	CustomFields: 
	[
		{
			"Id": 0,
			"Name": "String",
			"Description": "String",
			"Width": 0,
			"DataType": "String",
			"DefaultValue": "String",
			"IsMandatory": false,
			"MandatoryErrorMessage": "String",
			"MaxLength": 0,
			"MultipleLineText": false,
			"RegEx": "String",
			"RegExErrorMessage": "String",
			"Values": 
			[
				{
					"Value": "String"
				}
			]
		}
	],
	CustomFieldValues: 
	[
		{
			Id: 0,
			Column: String,
			Name: String,
			Description: String,
			Value: String,
			DataType: String
		}
	],
	BookedResourceTypes: 
	[
		{
			Id: 0,
			Name: String,
			Resources: 
			[
				{
					Id: 0,
					Name: String,
					Color: String,
					Email: String,
					MobilePhone: String,
					AccessGroup: String,
					EmailNotification: False,
					SMSNotification: False,
					EmailReminder: False,
					SMSReminder: False
				}
			]
		}
	],
	Company: 
	{
		Name: String,
		Category: String,
		Street1: String,
		Street2: String,
		ZipCode: String,
		City: String,
		CountryId: String,
		Longitude: String,
		Latitude: String,
		Phone: String,
		Email: String,
		HomePage: String,
		SitePath: String,
		IsFavorite: False,
		PaymentProviderId: 0
	},
	Customer: 
	{
		Firstname: String,
		Lastname: String,
		Email: String,
		Phone: String,
		FacebookUserName: String,
		ImageUrl: String,
		CorporateIdentityNumber: String,
		InvoiceAddress1: String,
		InvoiceAddress2: String,
		InvoiceCity: String,
		InvoicePostalCode: String,
		InvoiceCountryCode: String
	},
	Quantities: 
	[
		{
			Id: 0,
			Quantity: 0,
			Price: 0,
			PriceBeforeRebate: 0,
			CurrencyId: String,
			PriceSign: String,
			Category: String,
			VAT: 0,
			PriceText: String,
			OccupiesSpot: False
		}
	],
	Service: 
	{
		Id: 0,
		Name: String,
		Description: String,
		LengthInMinutes: 0,
		MaxNumberOfSpotsPerBooking: 0,
		MinNumberOfSpotsPerBooking: 0,
		GroupBooking: 
		{
			Active: False,
			Min: 0,
			Max: 0
		},
		MultipleResource: 
		{
			Active: False,
			Min: 0,
			Max: 0
		},
		IsGroupBooking: False,
		IsPaymentEnabled: False
	},
	InvoiceAddress: 
	{
		UserId: 00000000-0000-0000-0000-000000000000,
		CorporateIdentityNumber: String,
		InvoiceAddress1: String,
		InvoiceAddress2: String,
		InvoiceCity: String,
		InvoicePostalCode: String,
		InvoiceCountryCode: String
	},
	PaymentExpiration: "0001-01-01T00:00:00",
	Log: 
	[
		{
			Id: 0,
			BookingId: 0,
			EventTypeId: 0,
			EventType: 
			{
				Id: 0,
				Name: String,
				Description: String
			},
			Comments: String,
			UserName: String
		}
	],
	PaymentLog: 
	[
		{
			Id: 0,
			BookingId: 0,
			PaymentReferenceId: String,
			OrderItemReferenceId: String,
			PaymentProviderId: 0,
			Amount: 0,
			VAT: 0,
			AmountCredited: 0,
			CurrencyId: String,
			CurrencyInfo: 
			{
				Id: String,
				Name: String,
				CurrencySign: String
			},
			Comments: String
		}
	],
	CheckoutLog: 
	[
		{
			BookingId: 0,
			PurchaseId: 0,
			ExpirationTime: "0001-01-01T00:00:00",
			Snippet: String,
			Status: String,
			Message: String
		}
	],
	ExternalReference: 
	[
		{
			ReferenceType: String,
			ReferenceTypeId: 0,
			ExternalData: String,
			CreatedBy: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	LengthInMinutes: 0,
	BookedBy: String,
	BookedComments: String,
	UnbookedComments: String,
	CommentsToCustomer: String,
	UnbookedOn: "0001-01-01T00:00:00",
	CancellationCode: String,
	RatingCode: String
}