younifyd
Menu

Delete Customer By Id

This API helps you delete a customer.

DELETE/customers/{customerId}

Use it in a workflow

  1. Add a step and choose the WooCommerce connector.
  2. Pick the Delete Customer By Id action (under Customers).
  3. Fill in the fields below, then reference the result from later steps as {{deleteCustomerById.response.data}}.

Request

Path parameters

customerIdintegerrequired

ID of customer to delete

Query parameters

forcestringrequired

Required to be true, as resource does not support trashing.

reassigninteger

User ID to reassign posts to.

Response

Returns 200 with an object. Read it in later steps with {{deleteCustomerById.response.data.<field>}}.

idinteger

Unique identifier for the resource. read-only

date_createdstring (date-time)

The date the customer was created, in the site's timezone. read-only

date_created_gmtstring (date-time)

The date the customer was created, as GMT. read-only

date_modifiedstring (date-time)

The date the customer was last modified, in the site's timezone. read-only

date_modified_gmtstring (date-time)

The date the customer was last modified, as GMT. read-only

emailstring

The email address for the customer. mandatory

first_namestring

Customer first name.

last_namestring

Customer last name.

rolestring

Customer role. read-only

usernamestring

Customer login name.

passwordstring

Customer password. write-only

billingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

Country code in ISO 3166-1 alpha-2 format.

emailstring

Email address.

phonestring

Phone number.

shippingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

ISO code of the country.

phonestring

Phone number.

is_paying_customerboolean

Is the customer a paying customer? read-only

avatar_urlstring

Avatar URL. read-only

meta_dataarray<object>

Meta data.

idinteger

Meta ID.

keystring

Meta key.

valueobject

Meta value.

display_keystring

Meta key for UI display.

display_valueobject

Meta value for UI display.

json
{
  "id": 0,
  "date_created": "2025-01-01T00:00:00Z",
  "date_created_gmt": "2025-01-01T00:00:00Z",
  "date_modified": "2025-01-01T00:00:00Z",
  "date_modified_gmt": "2025-01-01T00:00:00Z",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "role": "string",
  "username": "string",
  "password": "string",
  "billing": {
    "first_name": "string",
    "last_name": "string",
    "company": "string",
    "address_1": "string",
    "address_2": "string",
    "city": "string",
    "state": "string",
    "postcode": "string",
    "country": "string",
    "email": "string",
    "phone": "string"
  }
}

Need more? See the WooCommerce guide for connection setup and behaviour shared by every action.