BokaMera.API.Host

<back to all web services

ExportReport

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/bookings/{BookingId}/reports/{ReportId}Get a report as a PDF fileGet 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

VB.NET ExportReport DTOs

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

HTTP + OTHER

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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}