TicketUserServices

<back to all web services

DiscountCodeCreateRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/DiscountCode
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel

Namespace Global

    Namespace TicketUserServices.ServiceModel

        Public Partial Class DiscountCode
            Public Overridable Property ID As Integer
            Public Overridable Property DiscountCodeType As Integer
            Public Overridable Property Code As String
            Public Overridable Property IsMultiUse As Nullable(Of Boolean)
            Public Overridable Property MaxTickets As Nullable(Of Integer)
            Public Overridable Property IsSingleUse As Nullable(Of Boolean)
            Public Overridable Property IsForPhoneNumberOnly As Nullable(Of Boolean)
            Public Overridable Property FullPhoneNumber As String
            Public Overridable Property IsUsed As Nullable(Of Boolean)
            Public Overridable Property IsValid As Nullable(Of Boolean)
        End Class

        Public Partial Class DiscountCodeCreateRequest
            Public Overridable Property Item As DiscountCode
        End Class

        Public Partial Class DiscountCodeResult
            Public Overridable Property Item As DiscountCode
            Public Overridable Property StatusCode As Integer
            Public Overridable Property Message As String
        End Class
    End Namespace
End Namespace

VB.NET DiscountCodeCreateRequest 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.

POST /DiscountCode HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"item":{"id":0,"discountCodeType":0,"code":"String","isMultiUse":false,"maxTickets":0,"isSingleUse":false,"isForPhoneNumberOnly":false,"fullPhoneNumber":"String","isUsed":false,"isValid":false}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"item":{"id":0,"discountCodeType":0,"code":"String","isMultiUse":false,"maxTickets":0,"isSingleUse":false,"isForPhoneNumberOnly":false,"fullPhoneNumber":"String","isUsed":false,"isValid":false},"statusCode":0,"message":"String"}