1. Home
  2. Docs
  3. REST API
  4. Developer documentation
  5. Update a generator

Update a generator

DESCRIPTION

Updates a generator by its ID. The response contains the updated generator data object.

REQUEST URL

PUT

/wp-json/lmfwc/v2/generators/{generator_id}

REQUEST HEADERS

Content-Type: application/json

REQUEST BODY:

{

“name”: “Update Generator”,

“charset”: “NEWGEN-RATOR”,

“chunks”: “6”,

“chunk_length”: “3”,

“times_activated_max”: 3,

“separator”: “-“,

“prefix”: null,

“suffix”: null,

“expires_in”: 15

}

RESPONSE EXAMPLE:

{

“success”: true,

“data”: {

“id”: 5,

“name”: “Update Generator”,

“charset”: “NEWGEN-RATOR”,

“chunks”: 6,

“chunkLength”: 3,

“timesActivatedMax”: “3”,

“separator”: “-“,

“prefix”: null,

“suffix”: null,

“expiresIn”: “15”,

“createdAt”: “2022-07-28 11:41:21”,

“createdBy”: “1”,

“updatedAt”: “2022-08-03 07:55:17”,

“updatedBy”: “1”

}

}

Was this article helpful to you? Yes No

How can we help?