Importing members

You want to import pre-existing customers and related orders into Memberful. We'll start by using the members endpoint from the Admin API to import a customer.

Request

POST https://yoursite.memberful.com/admin/members.json?auth_token=XXXXXX
Content-Type: application/json
Accept: application/json
{
  "member": {
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "password": "password",
    "username": "john_doe"
  }
}

Response

Status: 201 Created
Content-Type: application/json
{
  "member": {
    "address": {
      "street": "Street",
      "city": "City",
      "postal_code": "Postal code",
      "country": "City"
    },
    "created_at": 1490702268,
    "credit_card": {
      "exp_month": 1,
      "exp_year": 2040
    },
    "custom_field": "Custom field value",
    "email": "john.doe@example.com",
    "first_name": "John",
    "full_name": "John Doe",
    "id": 0,
    "last_name": "Doe",
    "phone_number": "555-12345",
    "stripe_customer_id": "cus_00000",
    "unrestricted_access": false,
    "username": "john_doe"
  },
  "products": [

  ],
  "subscriptions": [

  ]
}

You may also send New free member created and Password reset emails, but they are disabled by default.

To send them, specify it in your request:

{
  "member": {
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "password": "password",
    "username": "john_doe"
  },
  "send_new_free_member_created_email": true,
  "send_password_reset_email": true
}

Import and associate orders

We'll now use the orders endpoint from the Admin API to import an order and associate it with our newly created member.

Request

POST https://yoursite.memberful.com/admin/orders.json?auth_token=XXXXXX
Content-Type: application/json
Accept: application/json
{
  "order": {
    "member_id": 0,
    "products": [

    ],
    "subscriptions": [
      42
    ],
    "receipt": "receipt text",
    "created_at": 1490702268
  }
}

Response

Status: 201 Created
Content-Type: application/json
{
  "order": {
    "uuid": "4DACB7B0-B728-0130-F9E8-102B343DC979",
    "number": "4DACB7B0",
    "total": 100000000,
    "status": "completed",
    "receipt": "receipt text",
    "member": {
      "address": {
        "street": "Street",
        "city": "City",
        "postal_code": "Postal code",
        "country": "City"
      },
      "created_at": 1490702268,
      "credit_card": {
        "exp_month": 1,
        "exp_year": 2040
      },
      "custom_field": "Custom field value",
      "email": "john.doe@example.com",
      "first_name": "John",
      "full_name": "John Doe",
      "id": 0,
      "last_name": "Doe",
      "phone_number": "555-12345",
      "stripe_customer_id": "cus_00000",
      "unrestricted_access": false,
      "username": "john_doe"
    },
    "products": [

    ],
    "subscriptions": [
      {
        "subscription": {
          "id": 0,
          "price": 1000,
          "name": "Sample plan",
          "slug": "0-sample-plan",
          "renewal_period": "monthly",
          "interval_unit": "month",
          "interval_count": 1,
          "for_sale": true
        }
      }
    ]
  }
}

General

How to

CMS Integrations

Email Newsletters

Discussion Forums

WordPress

Video

API