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.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.API.ServiceModel.Enums;

namespace BokaMera.API.ServiceModel.Dtos
{
    [ValidateRequest("IsAuthenticated")]
    public partial class ExportReport
    {
        ///<summary>
        ///Id of the booking
        ///</summary>
        [ApiMember(Description="Id of the booking", IsRequired=true, ParameterType="path")]
        public virtual int BookingId { get; set; }

        ///<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 virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///Id of the report
        ///</summary>
        [ApiMember(Description="Id of the report", IsRequired=true, ParameterType="path")]
        public virtual int ReportId { get; set; }

        public virtual SendReceiptMethod SendReceiptMethod { get; set; }
    }

}

namespace BokaMera.API.ServiceModel.Enums
{
    public enum SendReceiptMethod
    {
        Email = 1,
        PdfExport = 2,
    }

}

C# ExportReport DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

{}