REST API (Pro)
Enwikuna License Manager Pro ist in die WordPress REST API integriert. Du kannst damit Lizenzen und weitere Produktdaten über standardisierte HTTP-Anfragen erstellen, lesen, aktualisieren und löschen.
Voraussetzungen
Abschnitt betitelt „Voraussetzungen“- WordPress 4.4 oder neuer
- Aktivierte WordPress-Permalinks
- Eine HTTPS-Verbindung
- Ein REST-API-Schlüssel aus den Einstellungen von Enwikuna License Manager Pro
Versionierung und Basis-URL
Abschnitt betitelt „Versionierung und Basis-URL“Die derzeitige API-Version ist v1. Alle Routen beginnen mit:
/wp-json/elm/v1/Neue, abwärtskompatible Routen und Felder werden innerhalb dieser Version ergänzt. Wenn sich bestehende Routen inkompatibel ändern, wird dafür eine neue API-Version eingeführt.
Authentifizierung
Abschnitt betitelt „Authentifizierung“Erstelle in den Einstellungen von Enwikuna License Manager Pro einen REST-API-Schlüssel. Für Benutzeranmeldungen stehen zusätzlich JSON Web Tokens zur Verfügung. Die konkrete Authentifizierung jeder Route und die erforderlichen Request-Felder findest du in der API-Referenz.
Werkzeuge und Clients
Abschnitt betitelt „Werkzeuge und Clients“Im Verzeichnis sample-data des Plugins befindet sich eine Postman Collection. Du kannst die unten bereitgestellte OpenAPI-Datei außerdem direkt in Postman, Insomnia oder einen OpenAPI-kompatiblen Codegenerator importieren.
- Enwikuna License Manager Client für WordPress-Plugins und Themes
- Postman
- Insomnia
Signierte Produktdateien prüfen
Abschnitt betitelt „Signierte Produktdateien prüfen“Beim Abruf von Produktdateien kannst du deren Signatur mit dem öffentlichen Schlüssel aus den REST-API-Einstellungen prüfen:
$signature_raw = base64_decode( $downloaded_signature_from_the_rest_api );$file_hash = hash_file( 'sha384', $downloaded_file_from_the_rest_api, true );$public_key_raw = base64_decode( $public_key_from_the_settings );
if ( sodium_crypto_sign_verify_detached( $signature_raw, $file_hash, $public_key_raw ) ) { // Datei ist authentisch und unverändert.} else { // Datei ist ungültig oder wurde verändert.}API-Routen
Abschnitt betitelt „API-Routen“Die folgende Referenz wird bei jedem Dokumentations-Build aus der aktuellen OpenAPI-Datei von Enwikuna License Manager Pro erzeugt. Sie enthält Parameter, Request Bodies, Antworten und Beispiele sämtlicher verfügbarer Routen.
46 Operationen
get/wp-json/elm/v1/customers/{customer_id_or_email}Get customer
This route can be used to get all details about a customer. If you set an access token returned by the login route, you're only allowed to request the licenses for the logged-in customer.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
customer_id_or_emailpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"email": "[email protected]",
"first_name": "Johannes",
"last_name": "Gmelin",
"display_name": "admin",
"role": "administrator",
"username": "admin",
"billing": {
"first_name": "Johannes",
"last_name": "Gmelin",
"company": "Enwikuna UG (haftungsbeschränkt)",
"address_1": "Alex-Gugler-Straße 16",
"address_2": "",
"city": "Waakirchen",
"postcode": "83666",
"country": "DE",
"state": "Wurschtland",
"email": "[email protected]",
"phone": "0123456789"
},
"shipping": {
"first_name": "Johannes",
"last_name": "Gmelin",
"company": "Enwikuna UG (haftungsbeschränkt)",
"address_1": "Alex-Gugler-Straße 16",
"address_2": "",
"city": "Waakirchen",
"postcode": "83666",
"country": "DE",
"state": "Wurschtland",
"phone": "9876543210"
},
"is_paying_customer": true
}
}
401Unauthorized
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_customer_missmatch_error",
"message": "You are only allowed to request data for the logged-in customer.",
"data": {
"status": 401
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_customer_not_found_error",
"message": "Unable to find customer with the given e-mail address.",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_decode_token_error",
"message": "Enwikuna License Manager Pro encryptor not configured.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/customers/{customer_id_or_email}/licensesGet all customer licenses
This route can be used to get all existing licenses for a customer. If you set an access token returned by the login route, you're only allowed to request the licenses for the logged-in customer.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
customer_id_or_emailpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 4,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": 20,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-03-03 17:26:44",
"source": "generator",
"hosts": [
"www.enwikuna.de"
],
"status": "delivered",
"internal_note": "Please check again in 3 weeks!",
"times_activated": 1,
"allowed_activations": 1,
"created_at": "2023-02-11 17:26:44",
"created_by": 33,
"updated_at": "2023-02-11 17:26:45",
"updated_by": 33
}
]
}
401Unauthorized
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_customer_missmatch_error",
"message": "You are only allowed to request data for the logged-in customer.",
"data": {
"status": 401
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_customer_not_found_error",
"message": "Unable to find customer with the given e-mail address.",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_decode_token_error",
"message": "Enwikuna License Manager Pro encryptor not configured.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/distributor-codesGet all distributor codes
This route can be used to get all existing distributor codes.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 1,
"redeemed": 0,
"code": "y8vyktGFkYNMqNUoQVSo",
"distributor_id": 1,
"product_id": 1860,
"license_id": null,
"source": "rest_api",
"created_at": "2024-05-25 13:05:05",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
]
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 111",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/distributor-codesCreate distributor code
This route can be used to create a new distributor code.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
redeemedinteger- If the code should be marked as redeemed or not (0 or 1)Optional
codestring- The code Optional
distributor_idinteger- The ID of the related distributorOptional
product_idinteger- The ID of the related productOptional
license_idinteger- The ID of the license generated by the distributor codeOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 4,
"redeemed": 0,
"code": "y8vyktGFkYNMqNUoQVSo",
"distributor_id": 1,
"product_id": 1860,
"license_id": 97,
"source": "rest_api",
"created_at": "2024-05-24 21:36:16",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1111",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_distributor_locked_error",
"message": "The distributor is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_distributor_code_error",
"message": "An error occurred while trying to create the distributor code.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/distributor-codes/{distributor_code}Get distributor code
This route can be used to get an existing distributor code.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_codepath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"redeemed": 1,
"code": "y8vyktGFkYNMqNUoQVSo",
"distributor_id": 1,
"product_id": 1860,
"license_id": 97,
"source": "rest_api",
"created_at": "2024-05-25 13:05:05",
"created_by": 96,
"updated_at": "2024-05-25 14:32:27",
"updated_by": 96
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_code_not_found_error",
"message": "Unable to find distributor code with given code: y8vyktGFkYNMqNUoQVSo",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/distributor-codes/{distributor_code}Update distributor code
This route can be used to update an existing distributor code.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_codepath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
redeemedinteger- If the code should be marked as redeemed or not (0 or 1)Optional
product_idinteger- The ID of the related productOptional
license_idinteger- The ID of the license generated by the distributor codeOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"redeemed": 1,
"code": "y8vyktGFkYNMqNUoQVSo",
"distributor_id": 1,
"product_id": 1860,
"license_id": 97,
"source": "rest_api",
"created_at": "2024-05-25 13:05:05",
"created_by": 96,
"updated_at": "2024-05-25 14:14:02",
"updated_by": 96
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_code_not_found_error",
"message": "Unable to find distributor code with given code: y8vyktGFkYNMqNUoQVSo",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_distributor_locked_error",
"message": "The distributor is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_update_distributor_code_error",
"message": "An error occurred while trying to update the distributor code.",
"data": {
"status": 500
}
}
delete/wp-json/elm/v1/distributor-codes/{distributor_code}Delete distributor code
This route can be used to delete an existing distributor code.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_codepath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": null
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_code_not_found_error",
"message": "Unable to find distributor code with given code: y8vyktGFkYNMqNUoQVSo",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_distributor_locked_error",
"message": "The distributor is locked.",
"data": {
"status": 405
}
}
post/wp-json/elm/v1/distributor-codes/generateGenerate distributor codes
This route can be used to generate new distributor codes.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
saveboolean- If the generated distributor codes should be saved (true or false)Optional
amountinteger- The amount of distributor codes that should be generatedOptional
redeemedinteger- Only if save: If the code should be marked as redeemed or not (0 or 1)Optional
distributor_idinteger- Only if save: The ID of the related distributorOptional
product_idinteger- Only if save: The ID of the related productOptional
license_idinteger- Only if save: The ID of the license generated by the distributor codeOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
"NSgOEb6zkCPd0da2KghS",
"pvKsWujFgixE496DVqh2"
]
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1111",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_distributor_locked_error",
"message": "The distributor is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generate_distributor_codes_error",
"message": "An error occurred while trying to generate the distributor codes.",
"data": {
"status": 500
}
}
post/wp-json/elm/v1/distributor-codes/redeem/{distributor_code}Redeem distributor code
This route can be used to redeem an existing distributor code. The host parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes 2) Host binding on license activation enabled: no
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_codepath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
hoststring- Optional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 8,
"redeemed": 1,
"code": "y8vyktGFkYNMqNUoQVSo",
"distributor_id": 11,
"product_id": 1860,
"license_id": 100,
"source": "dashboard",
"created_at": "2024-05-27 12:52:00",
"created_by": 1,
"updated_at": "2024-05-27 14:42:37",
"updated_by": 96
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_code_not_found_error",
"message": "Unable to find distributor code with given code: y8vyktGFkYNMqNUoQVSo",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_distributor_locked_error",
"message": "The distributor is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_redeem_distributor_code_error",
"message": "An error occurred while trying to redeem the distributor code.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/distributorsGet all distributors
This route can be used to get all existing distributors.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 1,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "dashboard",
"status": "inactive",
"internal_note": "Gets 100 free codes",
"created_at": "2024-05-22 16:07:00",
"created_by": 1,
"updated_at": "2024-05-22 16:18:03",
"updated_by": 96
}
]
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_invalid_distributor_status_error",
"message": "The distributor status is invalid: activeee",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_not_found_error",
"message": "Unable to find generator for given generator ID: 1111",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/distributorsCreate distributor
This route can be used to create a new distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
user_idinteger- The ID of the related userOptional
labelstring- The label used for the distributorOptional
generator_idinteger- The ID of the generator used to generated licenses for the distributor (define to overwrite product generator)Optional
statusstring- The status (inactive, active, locked)Optional
internal_notestring- The internal noteOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 9,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "rest_api",
"status": "inactive",
"internal_note": "Gets 100 free codes",
"created_at": "2024-05-23 00:44:59",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_user_not_found_error",
"message": "Unable to find user for given user ID: 1111",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_distributor_error",
"message": "An error occurred while trying to create the distributor.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/distributors/{distributor_id}Get distributor
This route can be used to get an existing distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "dashboard",
"status": "inactive",
"internal_note": "Gets 100 free codes",
"created_at": "2024-05-22 16:07:00",
"created_by": 1,
"updated_at": "2024-05-22 16:18:03",
"updated_by": 96
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/distributors/{distributor_id}Update distributor
This route can be used to update an existing distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
labelstring- The label used for the distributorOptional
generator_idinteger- The ID of the generator used to generated licenses for the distributor (define to overwrite product generator)Optional
statusstring- The status (inactive, active, locked)Optional
internal_notestring- The internal noteOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "dashboard",
"status": "inactive",
"internal_note": "Updated via Postman REST API",
"created_at": "2024-05-22 16:07:00",
"created_by": 1,
"updated_at": "2024-05-23 01:02:02",
"updated_by": 96
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_update_distributor_error",
"message": "An error occurred while trying to update the distributor.",
"data": {
"status": 500
}
}
delete/wp-json/elm/v1/distributors/{distributor_id}Delete distributor
This route can be used to delete an existing distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": null
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
get/wp-json/elm/v1/distributors/{distributor_id}/codesGet all distributor codes
This route can be used to get all existing distributor codes for a distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 1,
"redeemed": 0,
"code": "PRE-y8vyktGFkYNMqNUoQVSo-SUF",
"distributor_id": 1,
"product_id": 1860,
"license_id": null,
"source": "dashboard",
"created_at": "2024-05-23 08:51:21",
"created_by": 1,
"updated_at": null,
"updated_by": null
}
]
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
get/wp-json/elm/v1/distributors/lock/{distributor_id}Lock distributor
This route can be used to lock an existing distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "dashboard",
"status": "locked",
"internal_note": "Gets 100 free codes",
"created_at": "2024-05-22 16:07:00",
"created_by": 1,
"updated_at": "2024-05-22 16:10:43",
"updated_by": 96
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_lock_distributor_error",
"message": "An error occurred while trying to lock the distributor.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/distributors/unlock/{distributor_id}Unlock distributor
This route can be used to unlock an existing locked distributor.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
distributor_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"user_id": 1,
"label": "Admin",
"generator_id": 1,
"source": "dashboard",
"status": "inactive",
"internal_note": "Gets 100 free codes",
"created_at": "2024-05-22 16:07:00",
"created_by": 1,
"updated_at": "2024-05-22 16:18:03",
"updated_by": 96
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_distributor_not_found_error",
"message": "Unable to find distributor for given distributor ID: 1",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_unlock_distributor_error",
"message": "An error occurred while trying to unlock the distributor.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/generatorsGet all generators
This route can be used to get all existing generators.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 20,
"name": "Testgenerator",
"charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789",
"chunks": 4,
"chunk_length": 4,
"allowed_activations": 1,
"block_separator": "-",
"prefix": "PRE",
"suffix": "SUF",
"source": "dashboard",
"valid_for": 20,
"created_at": "2021-11-15 23:54:52",
"created_by": 1,
"updated_at": "2022-07-01 09:24:40",
"updated_by": 1
}
]
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generators_not_found_error",
"message": "No generators were found.",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/generatorsCreate generator
This route can be used to create a new generator.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
namestring- The nameOptional
charsetstring- The charsetOptional
chunksinteger- The chunksOptional
chunk_lengthinteger- The chunk lengthOptional
allowed_activationsinteger- The allowed activations for generated licensesOptional
block_separatorstring- The block separator, separating the chunksOptional
prefixstring- The prefix for generated license keysOptional
suffixstring- The suffix for generated license keysOptional
valid_forinteger- The time in days the generated licenses should be valid forOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 22,
"name": "REST API Generator",
"charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789",
"chunks": 4,
"chunk_length": 4,
"allowed_activations": 1,
"block_separator": "-",
"prefix": "PRE",
"suffix": "SUF",
"source": "rest_api",
"valid_for": 20,
"created_at": "2023-02-13 23:18:49",
"created_by": 1,
"updated_at": null,
"updated_by": null
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_generator_error",
"message": "An error occurred while trying to create the generator.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/generators/{generator_id}Get generator
This route can be used to get an existing generator.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
generator_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 20,
"name": "Testgenerator",
"charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789",
"chunks": 4,
"chunk_length": 4,
"allowed_activations": 1,
"block_separator": "-",
"prefix": "PRE",
"suffix": "SUF",
"source": "dashboard",
"valid_for": 20,
"created_at": "2021-11-15 23:54:52",
"created_by": 1,
"updated_at": "2022-07-01 09:24:40",
"updated_by": 1
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_not_found_error",
"message": "Unable to find generator for given generator ID: 20",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/generators/{generator_id}Update generator
This route can be used to update an existing generator.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
generator_idpath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
namestring- The nameOptional
charsetstring- The charsetOptional
chunksinteger- The chunksOptional
chunk_lengthinteger- The chunk lengthOptional
allowed_activationsinteger- The allowed activations for generated licensesOptional
block_separatorstring- The block separator, separating the chunksOptional
prefixstring- The prefix for generated license keysOptional
suffixstring- The suffix for generated license keysOptional
valid_forinteger- The time in days the generated licenses should be valid forOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 22,
"name": "REST API Generator",
"charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789",
"chunks": 4,
"chunk_length": 4,
"allowed_activations": 1,
"block_separator": "-",
"prefix": "PRE",
"suffix": "SUF",
"source": "rest_api",
"valid_for": 20,
"created_at": "2023-02-13 23:18:49",
"created_by": 1,
"updated_at": "2023-02-13 23:19:36",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_not_found_error",
"message": "Unable to find generator for given generator ID: 25",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_update_generator_error",
"message": "An error occurred while trying to update the generator.",
"data": {
"status": 500
}
}
delete/wp-json/elm/v1/generators/{generator_id}Delete generator
This route can be used to delete an existing generator.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
generator_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": null
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_still_assigned_error",
"message": "The generator can not be deleted because it is still assigned to the following products: 2075, 1976, 1860",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_not_found_error",
"message": "Unable to find generator for given generator ID: 21",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/generators/{generator_id}/generateGenerate licenses
This route can be used to generate new licenses by using an existing generator. The hosts parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
generator_idpath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
saveboolean- If the generated license keys should be saved as licenses (true or false)Optional
amountinteger- The amount of license keys that should be generatedOptional
typestring- Only if save: The type set to all generated licenses (normal & trial)Optional
product_idinteger- Only if save: The ID of a product set to all generated licensesOptional
order_idinteger- Only if save: The ID of an order set to all generated licensesOptional
customer_idinteger- Only if save: The ID of a customer set to all generated licensesOptional
hostsstring- Only if save: A comma separated list of hosts set to all generated licenses (URL or MAC address)Optional
statusstring- Only if save: The status all generated licenses should have (trial_approved, in_stock, sold, delivered, active, inactive, locked)Optional
internal_notestring- Only if save: The internal note set to all generated licensesOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
"PHJ6-1QU2-C61L-6Z98",
"5LF8-AMEC-TORW-BMOY"
]
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generator_not_found_error",
"message": "Unable to find generator for given generator ID: 20",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elm_generator_error",
"message": "Its not possible to generate the desired number of license keys with the given parameters since there are not enough combinations.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/licensesGet all licenses
This route can be used to get all existing licenses. The host parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 3,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "inactive",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-07 13:27:41",
"created_by": 1,
"updated_at": "2023-02-14 00:11:41",
"updated_by": 1
}
]
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_invalid_license_type_error",
"message": "The license type is invalid: normallll",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_product_not_found_error",
"message": "Unable to find product with given product ID: 1976222",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/licensesCreate license
This route can be used to create a new license. The hosts parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes 2) Host binding on license activation enabled: no
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
typestring- The type (normal & trial)Optional
product_idinteger- The ID of the related productOptional
order_idinteger- The ID of the related orderOptional
customer_idinteger- The ID of the related customerOptional
license_keystring- The license keyOptional
expires_atstring- The expiration date (YYYY-MM-DD hh:mm:ss)Optional
hostsstring- A comma separated list of hosts (URL or MAC address)Optional
statusstring- The status (trial_approved, in_stock, sold, delivered, active, inactive, locked)Optional
internal_notestring- The internal noteOptional
allowed_activationsinteger- The number of allowed activationsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 6,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-09 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "in_stock",
"internal_note": "Created via Postman REST API",
"times_activated": 0,
"allowed_activations": 5,
"created_at": "2023-02-15 07:52:39",
"created_by": 1,
"updated_at": null,
"updated_by": null
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_product_not_found_error",
"message": "Unable to find product with given product ID: 1976222",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_license_error",
"message": "An error occurred while trying to create the license.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/licenses/{license_key}Get license
This route can be used to get an existing license.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 3,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "inactive",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-07 13:27:41",
"created_by": 1,
"updated_at": "2023-02-14 00:11:41",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/licenses/{license_key}Update license
This route can be used to update an existing license. The hosts parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes 2) Host binding on license activation enabled: no
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
typestring- The type (normal & trial)Optional
product_idinteger- The ID of the related productOptional
order_idinteger- The ID of the related orderOptional
customer_idinteger- The ID of the related customerOptional
expires_atstring- The expiration date (YYYY-MM-DD hh:mm:ss)Optional
hostsstring- A comma separated list of hosts (URL or MAC address)Optional
statusstring- The status (trial_approved, in_stock, sold, delivered, active, inactive, locked)Optional
internal_notestring- The internal noteOptional
allowed_activationsinteger- The number of allowed activationsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 6,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "in_stock",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-15 07:52:39",
"created_by": 1,
"updated_at": "2023-02-15 07:53:30",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_update_license_error",
"message": "An error occurred while trying to update the license.",
"data": {
"status": 500
}
}
delete/wp-json/elm/v1/licenses/{license_key}Delete license
This route can be used to delete an existing license.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": null
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/licenses/activate/{license_key}Activate license
This route can be used to activate an existing license. The host parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes 2) Host check on license activation enabled: yes
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
hoststring- The host where the product gets activated on (URL or MAC address)Optional
product_uuidstring- The UUID defined inside the assigned license product used to verify the license activation for a specific productOptional
labelstring- The label used for the activationOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 8,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "active",
"internal_note": "Updated via Postman REST API",
"times_activated": 1,
"allowed_activations": 3,
"created_at": "2023-02-15 08:23:06",
"created_by": 1,
"updated_at": "2023-02-15 08:40:55",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_expired_error",
"message": "The license has expired.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_activate_license_error",
"message": "An error occurred while trying to activate the license.",
"data": {
"status": 500
}
}
post/wp-json/elm/v1/licenses/deactivate/{license_key}Deactivate license
This route can be used to deactivate an existing license. The host parameter is only needed if the following settings are configured inside Enwikuna License Manager: 1) Hosts enabled: yes
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
hoststring- The host which should be removed from the license during deactivation (URL or MAC address) (optional if REST API host binding disabled)Optional
license_activation_idinteger- The ID of the specific license activation (optional)Optional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 8,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "inactive",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-15 08:23:06",
"created_by": 1,
"updated_at": "2023-02-15 08:41:08",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_locked_error",
"message": "The license is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_deactivate_license_error",
"message": "An error occurred while trying to deactivate the license.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/licenses/lock/{license_key}Lock license
This route can be used to lock an existing license.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 3,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "locked",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-07 13:27:41",
"created_by": 1,
"updated_at": "2023-02-13 23:59:40",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_lock_license_error",
"message": "An error occurred while trying to lock the license.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/licenses/renew/{license_key}Renew license
This route can be used to receive a link to manually renew an existing license (only for simple & variable products, not subscription products or different types). When used, the user will be redirected to the cart for direct payment with the same license details.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"url": "https://entwicklungsumgebung/my-account/view-license/3/?action=renew-license&id=3&elmp-rest-api-renew-license-nonce=bb76d4c9230bd5f575b9a18ee1143469"
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_locked_error",
"message": "The license is locked.",
"data": {
"status": 405
}
}
get/wp-json/elm/v1/licenses/unlock/{license_key}Unlock license
This route can be used to unlock an existing locked license.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 3,
"type": "normal",
"product_id": 1976,
"order_id": 2103,
"customer_id": 33,
"generator_id": null,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"expires_at": "2023-05-12 00:00:00",
"source": "rest_api",
"hosts": [
"www.enwikuna.de",
"google.de"
],
"status": "in_stock",
"internal_note": "Updated via Postman REST API",
"times_activated": 0,
"allowed_activations": 3,
"created_at": "2023-02-07 13:27:41",
"created_by": 1,
"updated_at": "2023-02-13 23:55:48",
"updated_by": 1
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_unlock_license_error",
"message": "An error occurred while trying to unlock the license.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/licenses/validate/{license_key}Validate license
This route can be used to validate an existing license.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"times_activated": 0,
"allowed_activations": 3,
"remaining_activations": 3,
"license_activations": [
{
"id": 12,
"type": "online",
"license_id": 11,
"label": "MacBook Pro from Johannes",
"source": "rest_api",
"host": "google.de",
"created_at": "2023-11-19 16:21:56",
"created_by": 96,
"updated_at": "2023-11-19 16:22:09",
"updated_by": 1
}
],
"hosts": [
"www.enwikuna.de",
"google.de"
]
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/loginLogin
This route can be used to check login credentials for a customer. A token will be returned which needs to be set inside the request header of each other request. The lifetime of the token will be 1 hour. Use the refresh token from the response to obtain a new token by using the refresh token route.
Request Body
Inhaltstyp: multipart/form-data
user_emailstring- The e-mail address of the userOptional
user_passstring- The password of the userOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODUyMjc0NDgsInVpZCI6MX0.4-S_Dwpe954Zdivkw4foVh0g7GgA3waBSrsQxpP7lbY",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDA3Nzg4NDgsInVpZCI6MX0.PswhMSqWg7oO5W8MSvxRW0h4kJDn2cDiXkJvwLIReRc"
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_generate_token_error",
"message": "Enwikuna License Manager Pro encryptor not configured.",
"data": {
"status": 500
}
}
post/wp-json/elm/v1/login/refreshRefresh
This route can be used to check login credentials for a customer. A token will be returned which needs to be set inside the request header of each other request. The lifetime of the token will be 1 hour. Use the refresh token from the response to obtain a new token by using the refresh token route.
Request Body
Inhaltstyp: multipart/form-data
refresh_tokenstring- The received refresh token during loginOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODUyMjc1MDIsInVpZCI6MX0.BXzyTYQ0c1UPQ3H_lhWCO9g4XnIXhhaOGrkF_u5H7wY",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MDA3Nzg4NDgsInVpZCI6MX0.PswhMSqWg7oO5W8MSvxRW0h4kJDn2cDiXkJvwLIReRc"
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_decode_token_error",
"message": "Enwikuna License Manager Pro encryptor not configured.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/products/{product_id}Get product
This route can be used to get all details about a product.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
product_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1938,
"name": "Einfaches Produkt",
"slug": "einfaches-produkt",
"status": "publish",
"featured": false,
"catalog_visibility": "visible",
"description": "",
"short_description": "",
"sku": "0123456789012",
"price": "20.00",
"regular_price": "20.00",
"sale_price": "",
"date_on_sale_from": null,
"date_on_sale_to": null,
"total_sales": 4,
"tax_status": "taxable",
"tax_class": "",
"manage_stock": true,
"stock_quantity": 218,
"stock_status": "instock",
"backorders": "no",
"low_stock_amount": 0,
"sold_individually": false,
"weight": "20",
"length": "",
"width": "",
"height": "",
"upsell_ids": [],
"cross_sell_ids": [],
"parent_id": 0,
"reviews_allowed": true,
"purchase_note": "",
"attributes": [],
"default_attributes": [],
"menu_order": 0,
"post_password": "",
"virtual": false,
"downloadable": false,
"category_ids": [
45
],
"tag_ids": [],
"shipping_class_id": 0,
"downloads": [],
"image_id": "",
"gallery_image_ids": [],
"download_limit": 0,
"download_expiry": 0,
"rating_counts": [],
"average_rating": "0",
"review_count": 0,
"permalink": "https://entwicklungsumgebung/shop/weinbrand/einfaches-produkt/",
"type": "simple",
"elm": [
{
"is_license": true,
"use_generator": true,
"assigned_generator": 1,
"use_stock": false,
"uuid": "f200b966-53eb-4fd3-b548-09f18a11d75c",
"trial_length": 5,
"trial_period": "hour"
}
]
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_product_not_found_error",
"message": "Unable to find product with given product ID: 33",
"data": {
"status": 404
}
}
get/wp-json/elm/v1/products/download/latest/{license_key}/Download latest
This route can be used to download the latest license product version. The product set to the given license will be used to access the download item.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
consumer_keyquery · string- The consumer key from a REST API keyOptional
consumer_secretquery · string- The consumer secret from a REST API keyOptional
license_keypath · string- Erforderlich
Antworten
200OK
text/plain · Beispiel anzeigen
"The binary payload (the file which should be served)"
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_locked_error",
"message": "The license is locked.",
"data": {
"status": 405
}
}
get/wp-json/elm/v1/products/download/latest/signature/{license_key}/Download latest signature
This route can be used to download the signature for the latest license product version. The product set to the given license will be used to access the download item.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
consumer_keyquery · string- The consumer key from a REST API keyOptional
consumer_secretquery · string- The consumer secret from a REST API keyOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
"j+RXHhiZPNGTMo3t1DbLriJb2rOE/lH7e0XOYqM2k4tugyXbVhxm4gxGpNWMzS0t7+QYS56MWGFE+jRP++o6BA=="
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_locked_error",
"message": "The license is locked.",
"data": {
"status": 405
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_no_keypair_set_error",
"message": "Unable to find keypair for product signature generation.",
"data": {
"status": 500
}
}
post/wp-json/elm/v1/products/pingPing
This route can be used to ping to implement a usage check of your licenses and products.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
hoststring- The host where the product is installed on (URL or MAC address)Optional
installed_versionstring- The version of the product installed onOptional
product_namestring- The name of the product installed onOptional
license_keystring- The license key used to activate the product installed onOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 1,
"product_name": "Enwikuna License Manager Pro",
"license_id": 3,
"host": "https://entwicklungsumgebung/",
"installed_version": "1.0.0",
"last_ping": "2023-02-13 14:26:30"
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_product_installed_on_error",
"message": "An error occurred while trying to create the product installed on.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/products/update/{license_key}Update product
This route can be used to get all update data for a license product. The response also contains the URL to download the latest license product version.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
license_keypath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"license_key": "ABCD-EFGH-IJKL-MNOP",
"name": "Enwikuna License Manager Pro",
"url": "https://entwicklungsumgebung/store/plugins/enwikuna-license-manager-pro/",
"type": "subscription",
"new_version": "1.0.0",
"package": "https://entwicklungsumgebung/wp-json/elm/v1/products/download/latest/ABCD-EFGH-IJKL-MNOP?consumer_key=ck_xxx&consumer_secret=cs_xxx",
"tested": "6.1.1",
"requires": "6.1.1",
"requires_php": "7.4.0",
"last_updated": "2022-11-29 08:25:08",
"rating": 0,
"num_ratings": 0,
"upgrade_notice": "Be sure to run the final scripts after upgrading!",
"sections": {
"changelog": "<h4>1.0.0</h4><ul><li>Feature: Awesome functionality</li></ul>"
}
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_key_duplicates_enabled_error",
"message": "This REST API route is not available if the license key duplicates mode is enabled.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_license_not_found_error",
"message": "Unable to find license for given license key: ABCD-EFGH-IJKL-MNOP",
"data": {
"status": 404
}
}
405Method Not Allowed
application/json · Beispiel anzeigen
{
"code": "elmp_rest_license_locked_error",
"message": "The license is locked.",
"data": {
"status": 405
}
}
get/wp-json/elm/v1/releasesGet all releases
This route can be used to get all existing releases.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": [
{
"id": 5,
"version": "v1.3.10",
"release_date": "2023-12-13 00:00:00",
"product_id": 2415,
"tested": "5.4.0",
"requires": "6.4.0",
"requires_php": "8.3.1",
"changelog": "<p>Nothing changed</p>",
"upgrade_notice": "Just install and be happy :-)",
"source": "dashboard",
"created_at": "2023-12-13 19:08:36",
"created_by": 1,
"updated_at": "2023-12-13 23:05:15",
"updated_by": 1
},
{
"id": 6,
"version": "v1.3.10",
"release_date": "2023-12-24 00:00:00",
"product_id": 1976,
"tested": "5.4.0",
"requires": "6.4.3",
"requires_php": "7.4.0",
"changelog": "Added some features and fixed some bugs",
"upgrade_notice": "Be sure to run the final scripts after upgrading!",
"source": "rest_api",
"created_at": "2023-12-13 22:53:19",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
]
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_product_not_found_error",
"message": "Unable to find product with given product ID: 1976666",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/releasesCreate release
This route can be used to create a new release.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
Request Body
Inhaltstyp: multipart/form-data
versionstring- The versionOptional
release_datestring- The release date (YYYY-MM-DD)Optional
product_idinteger- The ID of the related productOptional
testedstring- The tested WordPress versionOptional
requiresstring- The required WordPress versionOptional
requires_phpstring- The required PHP versionOptional
changelogstring- The changelogOptional
upgrade_noticestring- The upgrade noticeOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 6,
"version": "v1.3.10",
"release_date": "2023-12-24 00:00:00",
"product_id": 1976,
"tested": "5.4.0",
"requires": "6.4.3",
"requires_php": "7.4.0",
"changelog": "Added some features and fixed some bugs",
"upgrade_notice": "Be sure to run the final scripts after upgrading!",
"source": "rest_api",
"created_at": "2023-12-13 22:53:19",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_product_not_found_error",
"message": "Unable to find product with given product ID: 1976666",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_create_release_error",
"message": "An error occurred while trying to create the release.",
"data": {
"status": 500
}
}
get/wp-json/elm/v1/releases/{release_id}Get release
This route can be used to get an existing release.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
release_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 6,
"version": "v1.3.10",
"release_date": "2023-12-24 00:00:00",
"product_id": 1976,
"tested": "5.4.0",
"requires": "6.4.3",
"requires_php": "7.4.0",
"changelog": "Added some features and fixed some bugs",
"upgrade_notice": "Be sure to run the final scripts after upgrading!",
"source": "rest_api",
"created_at": "2023-12-13 22:53:19",
"created_by": 96,
"updated_at": null,
"updated_by": null
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_release_not_found_error",
"message": "Unable to find release for given release ID: 1",
"data": {
"status": 404
}
}
post/wp-json/elm/v1/releases/{release_id}Update release
This route can be used to update an existing release.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
release_idpath · string- Erforderlich
Request Body
Inhaltstyp: multipart/form-data
release_datestring- The release date (YYYY-MM-DD)Optional
product_idinteger- The ID of the related productOptional
testedstring- The tested WordPress versionOptional
requiresstring- The required WordPress versionOptional
requires_phpstring- The required PHP versionOptional
changelogstring- The changelogOptional
upgrade_noticestring- The upgrade noticeOptional
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": {
"id": 6,
"version": "v1.3.10",
"release_date": "2023-12-24 00:00:00",
"product_id": 1976,
"tested": "5.4.0",
"requires": "6.4.3",
"requires_php": "7.4.0",
"changelog": "Updated the changelog",
"upgrade_notice": "Updated the upgrade notice field!",
"source": "rest_api",
"created_at": "2023-12-13 22:53:19",
"created_by": 96,
"updated_at": "2023-12-13 23:31:00",
"updated_by": 96
}
}
400Bad Request
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_missing_parameters_error",
"message": "No parameters were provided.",
"data": {
"status": 400
}
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_release_not_found_error",
"message": "Unable to find release for given release ID: 1",
"data": {
"status": 404
}
}
500Internal Server Error
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_update_release_error",
"message": "An error occurred while trying to update the release.",
"data": {
"status": 500
}
}
delete/wp-json/elm/v1/releases/{release_id}Delete release
This route can be used to delete an existing release.
Parameter
Access-Tokenheader · string- Access token received during login if enabled inside settingsOptional
release_idpath · string- Erforderlich
Antworten
200OK
application/json · Beispiel anzeigen
{
"success": true,
"data": null
}
403Forbidden
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_route_disabled_error",
"message": "This REST API route is disabled for the used REST API key.",
"data": {
"status": 403
}
}
404Not Found
application/json · Beispiel anzeigen
{
"code": "elmp_rest_api_release_not_found_error",
"message": "Unable to find release for given release ID: 1",
"data": {
"status": 404
}
}
Keine API-Routen entsprechen der aktuellen Suche.