BokaMera.API.Host

<back to all web services

ExportRebateCode

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/rebatecodes/{RebateCodeId}/reportsGet 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 ExportRebateCode
            Implements ICompany
            '''<Summary>
            '''Id of the rebate code
            '''</Summary>
            <ApiMember(Description:="Id of the rebate code", IsRequired:=true, ParameterType:="path")>
            Public Overridable Property RebateCodeId 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)

            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 ExportRebateCode DTOs

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

HTTP + CSV

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

{}