Symptoms

Sales order fails with the error:

APSC: Internal Server Error: {"message":"Error: 004 - API grants failed","variables"}

APS application "Axway API Management" cannot be provisioned with the following error on the endpoint side in /var/log/httpd/error_log:

APS-axway_api_management[6147]: ERROR  6147 Subscription:1373939 Error: 004 - API grants failed
APS-axway_api_management[6147]: ERROR  6147 Account:111011-Subscription:102002 Error creating subscription: {"message":"Error: 004 - API grants failed","variables":[]}
[2018/12/13 08:26:02] aps-runtime-error: {
    "code": 500,
    "error": "ApiClientException",
    "message": "Internal Server Error: {\"message\":\"Error: 004 - API grants failed\",\"variables\":[]}" 

The same can be seen in direct application log '/var/log/aps/axway_api_management.log' :

Dec 13 09:27:45 info APS-axway_api_management[6144]: INFO   6144 Subscription:1373939 Response Data[POST]: {"State":"Error","Code":"004","Description":"API grants failed"}
Dec 13 09:27:45 err APS-axway_api_management[6144]: ERROR  6144 Subscription:1373939 Error in API call response: {"code":500,"content_type":"application\/json","charset":"utf-8","body":{"State":"Error","Code":"004","Description":"API grants failed"},"headers":{"max-forwards":"19","via":"1.0 ptagwfe01 (Gateway), 1.0 ptagwfe01(Gateway)","connection":"close","x-correlationid"....
Dec 13 09:27:45 err APS-axway_api_management[6144]: ERROR  6144 Subscription:1373939 Error: 004 - API grants failed   

An account is not allowed to have more than one subscription to a service plan that contains the same api-type #X resource rate.

Resolution

Cancel the sales order.

Internal content

Link on internal Article