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. |
---|
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,
}
}
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
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: testapi.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {}