Correct PURCHASE request:
POST /handler.php HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: isv.endpoint.example.org
Authorization: Basic am9objpxd2UxMjM=
APS_PROTOCOL_MODEL=2&APS_ACTION=PURCHASE&APS_TEST_MODE=N&PURCHASE_ID=12345678&PRODUCT_ID=someproduct1&PURCHASE_DATE=12%5c03%5c2016&SUBSCRIPTION_DATE=12%5c03%5c2016&START_DATE=12%5c03%5c2016&EXPIRY_DATE=22%5c04%5c2016®_NAME=54321
Successful PURCHASE response with a binary license body:
HTTP/1.1 200 OK
Date: Thu, 12 Mar 2016 15:02:10 GMT
Server: Web Server
X-APS-Expiration-Date: Fri, 22 Apr 2016 15:02:10 GMT
Content-Type: application/octet-stream
<response body bytes go here>
Correct RENEW request:
POST /handler.php HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: isv.endpoint.example.org
Authorization: Basic am9objpxd2UxMjM=
APS_PROTOCOL_MODEL=2&APS_ACTION=RENEW&APS_TEST_MODE=N&PURCHASE_ID=12345678&PRODUCT_ID=someproduct1&PURCHASE_DATE=12%5c04%5c2016&SUBSCRIPTION_DATE=12%5c03%5c2016&START_DATE=12%5c04%5c2016&EXPIRY_DATE=22%5c05%5c2016&PREVIOUS_LICENSE_BODY=NCA4IDE1IDE2IDIzIDQy®_NAME=54321
Successful RENEW response with a binary license body:
HTTP/1.1 200 OK
Date: Thu, 12 Mar 2016 15:02:10 GMT
Server: Web Server
X-APS-Expiration-Date: Sun, 22 May 2016 15:02:10 GMT
Content-Type: application/octet-stream
<response body bytes go here>
Incorrect request (an invalid EXPIRY_DATE is specified):
POST /handler.php HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: isv.endpoint.example.org
Authorization: Basic am9objpxd2UxMjM=
APS_PROTOCOL_MODEL=2&APS_ACTION=PURCHASE&APS_TEST_MODE=N&PURCHASE_ID=12345678&PRODUCT_ID=someproduct1&PURCHASE_DATE=12%5c03%5c2016&SUBSCRIPTION_DATE=12%5c03%5c2016&START_DATE=12%5c03%5c2016&EXPIRY_DATE=22%5c04%5c2015®_NAME=54321
Error response:
HTTP/1.1 400 Bad Request
Date: Thu, 12 Mar 2016 15:02:10 GMT
Server: Web Server
Content-Type: text/plain; charset=UTF-8
Error: Subscription expiration date cannot be less than subscription start date
Unauthorized response:
HTTP/1.1 401 Unauthorized
Date: Thu, 12 Mar 2016 15:02:10 GMT
Server: Web Server
Content-Type: text/plain; charset=UTF-8
WWW-Authenticate: Basic realm="License Key Generator"
Error: No credentials supplied. Please authorize
Authorization failed response:
HTTP/1.1 403 Forbidden
Date: Thu, 12 Mar 2016 15:02:10 GMT
Server: Web Server
Content-Type: text/plain; charset=UTF-8
Error: Access denied