Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /bookings/{BookingId}/reports/{ReportId} | Get a report as a PDF file | Get a PDF report. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Enums
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class ExportReport
'''<Summary>
'''Id of the booking
'''</Summary>
<ApiMember(Description:="Id of the booking", IsRequired:=true, ParameterType:="path")>
Public Overridable Property BookingId As Integer
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''Id of the report
'''</Summary>
<ApiMember(Description:="Id of the report", IsRequired:=true, ParameterType:="path")>
Public Overridable Property ReportId As Integer
Public Overridable Property SendReceiptMethod As SendReceiptMethod
End Class
End Namespace
Namespace BokaMera.API.ServiceModel.Enums
Public Enum SendReceiptMethod
Email = 1
PdfExport = 2
End Enum
End Namespace
End Namespace
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.
GET /bookings/{BookingId}/reports/{ReportId} HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { }