1. Home
  2. Docs
  3. WooCommerce License Keys
  4. API
  5. Errors Output

Errors Output

WooCommerce License Keys allows for errors output format configuration. This setting is located at “Dashboard” -> “WooCommerce” -> “Settings”, “Advanced Tab” -> “License Keys API sub tab”. 

WooCommerce license keys error output format options

Grouped by property name

When “Grouped by property name” is selected, the errors returned in the response are grouped by a property name. (i.e. ‘store_code’, ‘license_key’ or ‘sku’).

Response example:

{
    "error": true,
    "status": 500,
    "errors": {
        "license_key": [
            "Invalid license key."
        ]
    }
}

Associated by an error code

When “Associated by an error code” is selected, the errors returned in the response are associated by an error code.

Response example:

{
    "error": true,
    "status": 500,
    "errors": {
        "3": [
            "Invalid license key."
        ]
    }
}

List of error codes

This is the list of error codes returned by the regular and paid plugins (title format [error code]:[error message]):

1: Invalid code.

Returned when the store code provided do not match the one set for the API.

2: Invalid license key.

Returned when the license key provided do not match the license key string format established by the API. (regex validation)

3: Invalid license key.

Returned when the SKU provided do not match the product SKU associated with the license key.

4: Invalid license key.

Returned when the license key provided do not match the license key string format established by the API. (missing dash validation)

5: Invalid license key.

Returned when the license key provided was not found in the database.

100: Required.

Returned when no SKU was provided in the request.

101: Required.

Returned when no license key code was provided in the request.

102: Required.

Returned when no store code was provided in the request.

103: Required.

Returned when no activation ID was provided in the request.

104: Required.

Returned when no domain was provided in the request.

200: License key has expired.

Returned when the license key provided has expired.

201: License key activation limit reached. Deactivate one of the registered activations to proceed.

Returned when the license key provided has reached the limit of activations allowed.

202: License key domain activation limit reached. Deactivate one or more of the registered activations to proceed.

Returned when the license key provided has reached the domain limit allowed.

203: Invalid activation.

Returned when the Activation ID provided was not found.

Was this article helpful to you? Yes 1 No