{"method":"GET","path":"https://api.revcent.com/v2/coupons/validate","summary":"Validate A Coupon Code","description":"Validate a coupon using the coupon code. A rejected coupon code will display an error explaining the reason for rejection, while an applicable coupon code will display the discount type and amount.","operationId":"ValidateCouponCode","parameters":[{"in":"query","name":"coupon_code","description":"The existing coupon code you wish to validate.","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"The API call response code, 1 = Success","type":"integer","enum":[1]}},"title":"APICallResponseInfo","type":"object","additionalProperties":false},{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character coupon ID.","minLength":20,"maxLength":20},"coupon_code":{"type":"string","description":"The coupon code."},"enabled":{"type":"boolean","description":"Whether the coupon is currently enabled."},"start_date_unix":{"description":"The coupon start date.","type":"integer","format":"unix-time"},"end_date_unix":{"description":"The coupon end date.","type":"integer","format":"unix-time"},"discount_type":{"type":"string","description":"The coupon discount type, either percent or amount.","enum":["percent","amount"]},"discount_value":{"description":"The coupon discount value relative to the discount type.","type":"number","format":"float"},"num_use":{"description":"The total number of times the coupon was used in a successful sale.","type":"integer"},"coupon_profile":{"description":"The coupon profile associated with the coupon.","type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character coupon profile ID.","minLength":20,"maxLength":20},"enabled":{"type":"boolean","description":"Whether the coupon profile is enabled."},"num_use_max":{"description":"Whether there is a maximum use limit within the coupon profile associated with the coupon. 0 = no limit.","type":"integer"}}},"result":{"description":"The result field will indicate the validity of the coupon code.","type":"string"}}}]}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}