Developer documentation

Create a generator

Estimated reading: 1 minute 1137 views

DESCRIPTION

Creates a new generator. The response contains the newly created generator data object.

REQUEST URL

POST

/wp-json/lmfwc/v2/generators

REQUEST HEADERS

Content-Type: application/json

REQUEST BODY:

{
  "name": "Generator created by the API",
  "charset": "LICENSE_GENERATE",
  "chunks": 7,
  "chunk_length": 2,
  "times_activated_max": 2,
  "separator": "-",
  "prefix": "PRE",
  "suffix": "FIX",
  "expires_in": 10
}

RESPONSE EXAMPLE:

{

    “success”: true,

    “data”: {

        “id”: 7,

        “name”: “Generator created by the API”,

        “charset”: “LICENSE_GENERATE”,

        “chunks”: 7,

        “chunkLength”: 2,

        “timesActivatedMax”: “2”,

        “separator”: “-“,

        “prefix”: “PRE”,

        “suffix”: “FIX”,

        “expiresIn”: “10”,

        “createdAt”: “2022-08-03 07:49:21”,

        “createdBy”: “1”,

        “updatedAt”: null,

        “updatedBy”: null

    }

}
Share this Doc

Create a generator

Or copy link

CONTENTS
Scroll to Top