πŸ§ͺ Tests and Simulations: Creating Custom API Endpoints, Testing OAuth Workflows, and Advanced Payment Automations

4. πŸ–Š Example: Updating Member Information (PUT Request)

Description:

In this example, you will update a member’s information, such as their email or password.

Steps:

  1. In Postman, set the request method to PUT.
  2. Enter the URL:
    https://your-site.com/wp-json/mp/v1/members/{member_id} Replace {member_id} with the ID of the member you want to update (e.g., 3).
  3. In the Authorization tab, select Bearer Token and add your API Key.
  4. Go to the Body tab and select raw with the format set to JSON.
  5. Enter the new information for the member, for example:
    { "email": "newemail@example.com" }
  6. Click Send.

Expected Response:

A confirmation showing the updated details:

{
    "id": 3,
    "username": "newmember",
    "email": "newemail@example.com",
    "status": "active"
}