YM REST Services

<back to all web services

Auth

The following routes are available for this service:
POST, OPTIONS/Ams/Authenticate/{Token}
POST/Ams/Authenticate
Auth Parameters:
NameParameterData TypeRequiredDescription
ConsumerKeybodystringNo
ConsumerSecretbodystringNo
AccessTokenbodystringNo
TokenpathstringNo
ClientIDbodyintNo
UserTypebodyAuthUserTypeNo

Allowable Values

  • Anonymous
  • Admin
  • Member
UsernamebodystringNo
PasswordbodystringNo
EmailAddressbodystringNo
IncludeMemberConfigbodyboolNo
IncludeExchangeTokenbodyboolNo
IncludeBrandingConfigbodyboolNo
DevicebodyDeviceNo

Allowable Values

  • Desktop
  • IOS
  • Android
AuthResponse Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
MemberIDformintNo
FailedLoginReasonformFailedLoginReasonNo

Allowable Values

  • None
  • MultipleAccounts
  • InvalidCredentials
  • AccountLockedOut
  • AccountSuspended
  • AccountPendingApproval
  • InvalidClient
  • InvalidToken
  • ConsentRequired
MemberConfigformMemberConfigResponseNo
BrandingConfigformBrandingConfigResponseNo
ExchangeTokenformstringNo
AuthenticateResponse Parameters:
NameParameterData TypeRequiredDescription
UserIdformstringNo
SessionIdformstringNo
UserNameformstringNo
DisplayNameformstringNo
ReferrerUrlformstringNo
BearerTokenformstringNo
RefreshTokenformstringNo
ResponseStatusformResponseStatusNo
MetaformDictionary<string, string>No
MemberConfigResponse Parameters:
NameParameterData TypeRequiredDescription
LocaleformstringNo
DateFormatformstringNo
CurrencyDecimalSeparatorformstringNo
CurrencyGroupSeparatorformstringNo
CurrencySymbolformstringNo
CurrencyPositivePatternformstringNo
CurrencyNegativePatternformstringNo
SiteUrlformstringNo
CareersIDformintNo
ClientNameMobileformstringNo
FullNameformstringNo
SecureUrlformstringNo
QuickLinksCountformintNo
MemberBaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
MemberIDformintNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
BrandingConfig Parameters:
NameParameterData TypeRequiredDescription
OptionsformDictionary<string, string>No
BaseDto Parameters:
NameParameterData TypeRequiredDescription
UsingRedisformboolNo
AppInitTimeformDateTimeNo
ServerIDformstringNo

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Ams/Authenticate/{Token} HTTP/1.1 
Host: ws.yourmembership.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConsumerKey: String,
	ConsumerSecret: String,
	AccessToken: String,
	Token: String,
	ClientID: 0,
	UserType: Anonymous,
	Username: String,
	Password: String,
	EmailAddress: String,
	IncludeMemberConfig: False,
	IncludeExchangeToken: False,
	IncludeBrandingConfig: False,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ClientID: 0,
	MemberID: 0,
	FailedLoginReason: None,
	MemberConfig: 
	{
		Locale: String,
		DateFormat: String,
		CurrencyDecimalSeparator: String,
		CurrencyGroupSeparator: String,
		CurrencySymbol: String,
		CurrencyPositivePattern: String,
		CurrencyNegativePattern: String,
		SiteUrl: String,
		CareersID: 0,
		ClientNameMobile: String,
		FullName: String,
		SecureUrl: String,
		QuickLinksCount: 0,
		MemberID: 0,
		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: 2024-05-03T07:12:44.9481800-04:00,
		Device: Desktop
	},
	BrandingConfig: 
	{
		Options: 
		{
			String: String
		},
		UsingRedis: True,
		AppInitTime: 2024-05-03T05:23:12.6024055-04:00,
		ServerID: WS-6-134-823,
		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: 2024-05-03T07:12:44.9501793-04:00,
		Device: Desktop
	},
	ExchangeToken: String,
	UserId: String,
	SessionId: String,
	UserName: String,
	DisplayName: String,
	ReferrerUrl: String,
	BearerToken: String,
	RefreshToken: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Meta: 
	{
		String: String
	}
}