Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
GET | /rebatecodes/{RebateCodeId}/reports | 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 ExportRebateCode
: ICompany
{
///<summary>
///Id of the rebate code
///</summary>
[ApiMember(Description="Id of the rebate code", IsRequired=true, ParameterType="path")]
public virtual int RebateCodeId { 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; }
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 .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /rebatecodes/{RebateCodeId}/reports HTTP/1.1 Host: api.bokamera.se Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {}