POST
/
api
/
loyalty
/
rule_edits
/
{id}
/
restore
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.loyalty.ruleEdits.restore('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

  console.log(response.id);
}

main();
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "loyaltyRuleId": "123e4567-e89b-12d3-a456-426614174001",
  "websiteId": "123e4567-e89b-12d3-a456-426614174002",
  "organizationId": "123e4567-e89b-12d3-a456-426614174003",
  "editedByUserId": "123e4567-e89b-12d3-a456-426614174004",
  "editedAt": "2021-08-30T20:00:00Z",
  "action": "create",
  "data": {
    "name": "New Rule Name"
  },
  "previousData": {
    "name": "Old Rule Name"
  },
  "comment": "Updated rule name"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required

Body

application/json · object
Body

The body is of type object.

Response

200
application/json
200

The response is of type object.