Requires any of the roles: | admin, oauthadmin | Requires the permission: | CanAdminMembers |
GET | /Ams/{ClientID}/MembershipPromoCodes/{MembershipID}/{MemberID} | Return a list of valid membership promo codes for the given Member | |
---|---|---|---|
PUT | /Ams/{ClientID}/MembershipPromoCodes | Validates a Membership Promo Code. | |
GET | /Ams/{ClientID}/MembershipPromoCodes/{MembershipID}/ | Return a list of membership promo codes for the given Membership |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
MembershipID | path | int | No | |
MemberID | path | int | No | |
PromoCode | body | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
UsingRedis | form | bool | No | |
AppInitTime | form | DateTime | No | |
ServerID | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ClientID | form | int | No | |
ResponseStatus | form | ResponseStatus | No | |
BypassCache | form | bool | No | |
DateCached | form | DateTime | No | |
Device | form | Device | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
MembershipPromoCodeList | form | List<MembershipPromoCode> | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
FriendlyName | form | string | No | |
FlatDiscount | form | double? | No | |
PercentDiscount | form | double? | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PromoCodeID | form | int? | No | |
ClientID | form | int | No | |
PromoCode | form | string | No | |
Expires | form | DateTime? | No | |
GLCode | form | string | No | |
QBClass | form | string | No | |
Start | form | DateTime? | No | |
UsageLimit | form | int | No | |
UsageOnePerUser | form | bool | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /Ams/{ClientID}/MembershipPromoCodes/{MembershipID}/{MemberID} HTTP/1.1
Host: ws.yourmembership.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
MembershipID: 0,
MemberID: 0,
PromoCode: String,
UsingRedis: True,
AppInitTime: 2025-01-15T06:19:47.4297411-05:00,
ServerID: WS-6-56-398,
ClientID: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
BypassCache: False,
DateCached: 2025-01-15T08:46:01.2377657-05:00,
Device: Desktop
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { MembershipPromoCodeList: [ { FriendlyName: String, FlatDiscount: 0, PercentDiscount: 0, PromoCodeID: 0, ClientID: 0, PromoCode: String, Expires: 0001-01-01, GLCode: String, QBClass: String, Start: 0001-01-01, UsageLimit: 0, UsageOnePerUser: False } ], MembershipID: 0, MemberID: 0, PromoCode: String, UsingRedis: True, AppInitTime: 2025-01-15T06:19:47.4297411-05:00, ServerID: WS-6-56-398, ClientID: 0, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } }, BypassCache: False, DateCached: 2025-01-15T08:46:01.2533969-05:00, Device: Desktop }