ApexERPHost

<back to all web services

ActivateCoupon

Requires Authentication
The following routes are available for this service:
PUT/Coupons/Activate
ActivateCoupon Parameters:
NameParameterData TypeRequiredDescription
CouponTypebodyintYes
PrefixbodystringYes
ActivateIdbodyGuidNo
ActivateCouponResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
ResultformCouponNo
Coupon Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CodeformstringNo
CouponTypeformintNo
ExpirationDateformDateTimeNo
VoidedformboolNo
UsedformboolNo
UseTimeformDateTime?No
DataformCouponDataNo
CouponStatusformint?No
ActivateIdformGuid?No
SpendIdformGuid?No
CouponData Parameters:
NameParameterData TypeRequiredDescription
ProdsformList<CouponProd>No
CouponProd Parameters:
NameParameterData TypeRequiredDescription
ProdIdformstringNo
IsServiceformintNo
TypeformintNo
SCountformdecimalNo
ValueTypeformintNo
ValueformdecimalNo

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.

PUT /Coupons/Activate HTTP/1.1 
Host: apex.nikoratrade.ge 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CouponType: 0,
	Prefix: String,
	ActivateId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Result: 
	{
		Id: 0,
		Code: String,
		CouponType: 0,
		ExpirationDate: 0001-01-01,
		Voided: False,
		Used: False,
		UseTime: 0001-01-01,
		Data: 
		{
			Prods: 
			[
				{
					ProdId: String,
					IsService: 0,
					Type: 0,
					SCount: 0,
					ValueType: 0,
					Value: 0
				}
			]
		},
		CouponStatus: 0,
		ActivateId: 00000000000000000000000000000000,
		SpendId: 00000000000000000000000000000000
	}
}