| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /bookings/{Id}/markaspaid | Approve a booking that has status awaitingpayment or awaitingpaymentnotimelimit | Updates an existing booking with paid status if you are authorized to do so. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
| Id | path | int? | Yes | Id of the booking |
| Comment | body | string | Yes | Any comment logged to the booking history |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| CompanyId | form | Guid | No | |
| From | form | DateTime | No | |
| To | form | DateTime | No | |
| Status | form | BookingStatusEnum | No | |
| StatusId | form | int | No | |
| StatusName | form | string | Yes | |
| StatusInfo | form | BookingStatusQueryResponse | Yes | |
| SendEmailReminder | form | bool | No | |
| SendSmsReminder | form | bool | No | |
| SendSmsConfirmation | form | bool | No | |
| SendEmailConfirmation | form | bool | No | |
| LastTimeToUnBook | form | DateTime? | No | |
| CustomFields | form | List<CustomFieldConfigData> | Yes | |
| CustomFieldValues | form | List<CustomFieldDataResponse> | Yes | |
| BookedResourceTypes | form | List<BookedResourceType> | Yes | |
| Company | form | BookedCompany | Yes | |
| Customer | form | BookedCustomer | Yes | |
| Quantities | form | List<BookedQuantity> | Yes | |
| Service | form | ServiceInfoResponse | Yes | |
| InvoiceAddress | form | InvoiceAddressResponse | Yes | |
| PaymentExpiration | form | DateTime? | No | |
| Log | form | List<BookingLogQueryResponse> | Yes | |
| PaymentLog | form | List<BookingPaymentLogQueryResponse> | Yes | |
| CheckoutLog | form | List<BookingCheckoutQueryResponse> | Yes | |
| ExternalReference | form | List<ExternalReferenceResponse> | Yes | |
| ResponseStatus | form | ResponseStatus | Yes | |
| LengthInMinutes | form | int? | No | |
| BookedBy | form | string | Yes | |
| BookedComments | form | string | Yes | |
| UnbookedComments | form | string | Yes | |
| CommentsToCustomer | form | string | Yes | |
| CreatedDate | form | DateTime | No | |
| UpdatedDate | form | DateTime | No | |
| UnbookedOn | form | DateTime? | No | |
| CancellationCode | form | string | Yes | |
| RatingCode | form | string | Yes |
| Name | Value | |
|---|---|---|
| Booked | 1 | |
| Unbooked | 2 | |
| Reserved | 3 | |
| Canceled | 4 | |
| AwaitingPayment | 5 | |
| AwaitingPaymentNoTimeLimit | 6 | |
| Payed | 7 | |
| AwaitingPaymentRequestFromAdmin | 8 | |
| AwaitingPaymentFromProvider | 9 | |
| Invoiced | 10 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | |
| Description | form | string | Yes | |
| Icon | form | string | Yes | |
| Color | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | Custom field id |
| Name | form | string | Yes | Configuration name. Example: 'Number of persons'. |
| Description | form | string | Yes | Custom field description. Example: 'For how many persons is this booking?' |
| Width | form | int? | No | Field width. Example: 20 for 20px |
| DataType | form | string | Yes | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
| DefaultValue | form | string | Yes | Default value of the field. Example: '3' |
| IsMandatory | form | bool | No | Determines if the field is required to have a value or not |
| MandatoryErrorMessage | form | string | Yes | Error message shown to the user if the field data is required but not entered |
| MaxLength | form | int | No | Max lenght of the field |
| MultipleLineText | form | bool | No | If the field should have multiple lines |
| RegEx | form | string | Yes | Regular expression used for validation of the field |
| RegExErrorMessage | form | string | Yes | Error message shown if the regular expression validation failed |
| Values | form | List<CustomFieldValueResponse> | Yes | The values to select from if Datatype is DropDown for this custom field |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Value | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Column | form | string | Yes | |
| Name | form | string | Yes | |
| Description | form | string | Yes | |
| Value | form | string | Yes | |
| DataType | form | string | Yes | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The resource type id |
| Name | form | string | Yes | The resource type name |
| Resources | form | List<BookedResource> | Yes | The resources inside resource type |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | |
| Color | form | string | Yes | |
| ImageUrl | form | Uri | Yes | |
| form | string | Yes | ||
| MobilePhone | form | string | Yes | |
| AccessGroup | form | string | Yes | |
| EmailNotification | form | bool | No | |
| SMSNotification | form | bool | No | |
| EmailReminder | form | bool | No | |
| SMSReminder | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | Yes | |
| LogoType | form | Uri | Yes | |
| Category | form | string | Yes | |
| Street1 | form | string | Yes | |
| Street2 | form | string | Yes | |
| ZipCode | form | string | Yes | |
| City | form | string | Yes | |
| CountryId | form | string | Yes | |
| Longitude | form | string | Yes | |
| Latitude | form | string | Yes | |
| Phone | form | string | Yes | |
| form | string | Yes | ||
| HomePage | form | string | Yes | |
| SitePath | form | string | Yes | |
| IsFavorite | form | bool | No | |
| PaymentProviderId | form | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Firstname | form | string | Yes | |
| Lastname | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes | |
| FacebookUserName | form | string | Yes | |
| ImageUrl | form | string | Yes | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The quantity Id |
| Quantity | form | int | No | The quantity for booked on this price category |
| Price | form | double? | No | The price |
| PriceBeforeRebate | form | double? | No | The price bofore rebate codes |
| CurrencyId | form | string | Yes | The price currency |
| PriceSign | form | string | Yes | The price sign |
| Category | form | string | Yes | The price category |
| VAT | form | decimal? | No | The price VAT in percent |
| PriceText | form | string | Yes | The price text to display |
| OccupiesSpot | form | bool | No | If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | |
| Description | form | string | Yes | |
| ImageUrl | form | Uri | Yes | |
| LengthInMinutes | form | int? | No | |
| MaxNumberOfSpotsPerBooking | form | int | No | |
| MinNumberOfSpotsPerBooking | form | int | No | |
| GroupBooking | form | GroupBookingSettings | Yes | |
| MultipleResource | form | MultipleResourceSettings | Yes | |
| IsGroupBooking | form | bool | No | |
| IsPaymentEnabled | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Active | form | bool | No | |
| Min | form | int | No | |
| Max | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Active | form | bool | No | |
| Min | form | int | No | |
| Max | form | int | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| InvoiceAddressId | form | Guid | No | |
| UserId | form | Guid? | No | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The booking log id |
| BookingId | form | int | No | The booking id |
| EventTypeId | form | int | No | The type of event |
| EventType | form | BookingLogEventTypeResponse | Yes | The type of event |
| Comments | form | string | Yes | Comments that could be added to the event log item |
| UserName | form | string | Yes | The user created the event |
| Created | form | DateTime | No | The date when the event occurred |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The event type id |
| Name | form | string | Yes | The event type name |
| Description | form | string | Yes | The event type description |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The booking payment log id |
| BookingId | form | int | No | The booking id |
| PaymentReferenceId | form | string | Yes | The payment reference id |
| OrderItemReferenceId | form | string | Yes | The payment order item reference id |
| PaymentProviderId | form | int? | No | The payment reference id |
| Amount | form | double | No | The payment amount |
| VAT | form | decimal | No | The payment VAT in percent |
| AmountCredited | form | double | No | The payment amount that is credited |
| CurrencyId | form | string | Yes | The payment currency id |
| CurrencyInfo | form | CurrencyInfoResponse | Yes | The payment currency info |
| Comments | form | string | Yes | Comments that could be added to the event log item |
| Created | form | DateTime | No | The date when the payment items was created |
| Updated | form | DateTime | No | The date when the payment items were updated. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | string | Yes | The currency id |
| Name | form | string | Yes | The currency id |
| CurrencySign | form | string | Yes | The currency id |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | The checkout id |
| BookingId | form | int | No | The booking id |
| PurchaseId | form | int? | No | The purchase id |
| ExpirationTime | form | DateTime? | No | The payment checkout expiration datetime |
| Snippet | form | string | Yes | The payment snippet code |
| Status | form | string | Yes | The payment status |
| Message | form | string | Yes | Log message |
| Created | form | DateTime | No | When the checkout log item was created |
| Updated | form | DateTime | No | When the checkout log item was updated |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | form | Guid | No | |
| Id | form | Guid | No | |
| OwnerId | form | Guid | No | |
| ReferenceType | form | string | Yes | |
| ReferenceTypeId | form | int | No | |
| ExternalData | form | string | Yes | |
| CreatedBy | form | string | Yes | |
| Updated | form | DateTime | No | |
| Created | form | DateTime | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /bookings/{Id}/markaspaid HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Id":0,"Comment":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
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"}