Membership programs API

Membership Programs

A Membership Program record contains the details about a merchant's membership program on the merchant's store. A store can have have multiple membership programs.

1257

The membership programs object


Attributes


id integer
Unique numeric identifier for the Membership Program.


enrollment_external_product_ids array
External IDs of the products configured as enrollment criteria for the membership program.


created_at datetime
The date and time when the membership program was created.


deleted_at datetime
The date and time when the membership program was deleted.


description string
Description for the membership program.


external_attributes array
Additional information about the membership program.


name string
The name of the membership program.


program_type string
The membership program type.

Possible values: paid-recurring, subscriber


status string
The status of the membership program.

Possible values: enabled, disabled


tag string
Base tag for the membership program.


updated_at datetime
The date and time when the membership was last updated.



Retrieve a membership program

Retrieves a membership program based on specified membership program id.

Scopes: read_memberships


Request

curl --location --request GET 'https://api.rechargeapps.com/memberships_programs/{id}' \
--header 'X-Recharge-Version: 2021-11' \
--header 'Content-Type: application/json' \
--header 'X-Recharge-Access-Token: {api_key}'

Responses

{
    "membership_program": {
        "id": 55,
        "enrollment_external_product_ids": [
            "7014208569481",
            "7167971065993"
        ],
        "created_at": "2022-05-12T12:40:15+00:00",
        "deleted_at": null,
        "description": "People who really love socks",
        "external_attributes": {
            "customer_tags": {
                "active": "rc-member-happy-socks-vip-active",
                "inactive": "rc-member-happy-socks-vip-inactive"
            },
            "image_path": "https://static.rechargecdn.com/membership-program-images/111111/xxxx172033ffe59ff6f2d26055a10a67072e914c92dc7cc11274faf2617922.png",
            "order_tag": "rc-member-happy-socks-vip",
            "segments": {
                "rc-member-happy-socks-vip-active": "RC Member - Happy Socks VIP - Active Members",
                "rc-member-happy-socks-vip-inactive": "RC Member - Happy Socks VIP - Inactive Members"
            }
        },
        "name": "Happy Socks VIP",
				"program_type": "paid_recurring",
        "status": "enabled",
        "tag": "rc-member-happy-socks-vip",
        "updated_at": "2022-05-12T12:40:15+00:00"
    }
}
{
    "errors": "Not Found"
}


List membership programs

Returns all membership programs from the store, or membership programs for the user given in the parameter.

Scopes: read_memberships

Query Parameters


ids string
Comma-separated list of membership_program_ids to filter


include_deleted string
Returns all deleted memberships programs.

Possible values: true, false


status string
Returns memberships that have the provided status.

Possible values: enabled, disabled


Request

curl --location --request GET 'https://api.rechargeapps.com/membership_programs' \
--header 'X-Recharge-Version: 2021-11' \
--header 'Content-Type: application/json' \
--header 'X-Recharge-Access-Token: {api_key}'

Response

{
    "next_cursor": null,
    "previous_cursor": null,
    "membership_programs": [
        {
            "id": 55,
            "enrollment_external_product_ids": [
                "7071713198217",
                "7071713198218"
            ],
            "created_at": "2022-05-12T12:40:15+00:00",
            "deleted_at": null,
            "description": "People who really love socks",
            "external_attributes": {
                "customer_tags": {
                    "active": "rc-member-happy-socks-vip-active",
                    "inactive": "rc-member-happy-socks-vip-inactive"
                },
                "image_path": "https://static.rechargecdn.com/membership-program-images/111111/xxxx172033ffe59ff6f2d26055a10a67072e914c92dc7cc11274faf2617922.png",
                "order_tag": "rc-member-happy-socks-vip",
                "segments": {
                    "rc-member-threads-a-lister-active": "RC Member - Happy Socks VIP - Active Members",
                    "rc-member-threads-a-lister-inactive": "RC Member - Happy Socks VIP - Inactive Members"
                }
            },
            "name": "Happy Socks VIP",
						"program_type": "paid_recurring",
            "status": "enabled",
            "tag": "rc-member-happy-socks-vip",
            "updated_at": "2022-05-12T12:40:15+00:00"
        },
        {
            "id": 51,
            "enrollment_external_product_ids": [
              	"7071713198218"
            ],
            "created_at": "2022-05-06T14:48:14+00:00",
            "deleted_at": null,
            "description": "Free Shipping for people that love salty candies",
            "external_attributes": {
                "customer_tags": {
                    "active": "rc-member-salty-candies-max-active",
                    "inactive": "rc-member-salty-candies-max-inactive"
                },
                "image_path": "https://static.rechargecdn.com/membership-program-images/111111/xxxx172033ffe59ff6f2d26055a10a67072e914c92dc7cc11274faf2617922.png",
                "order_tag": "rc-member-salty-candies-max",
                "segments": {
                    "rc-member-threads-a-lister-active": "RC Member - Salty Candies MAX - Active Members",
                    "rc-member-threads-a-lister-inactive": "RC Member - Salty Candies MAX - Inactive Members"
                }
            },
            "name": "Salty Candies MAX",
 						"program_type": "paid_recurring",
            "status": "disabled",
            "tag": "rc-member-salty-candies-max",
            "updated_at": "2022-04-13T20:16:08+00:00"
        },
        {
            "id": 33,
            "enrollment_external_product_ids": [
              	"7071713198219"
            ],
            "created_at": "2022-04-13T20:16:08+00:00",
            "deleted_at": null,
            "description": "People who really love dipping sauces",
            "external_attributes": {
                "customer_tags": {
                    "active": "rc-member-awesome-sauce-club-active",
                    "inactive": "rc-member-awesome-sauce-club-inactive"
                },
                "image_path": "https://static.rechargecdn.com/membership-program-images/111111/xxxx172033ffe59ff6f2d26055a10a67072e914c92dc7cc11274faf2617922.png",
                "order_tag": "rc-member-awesome-sauce-club",
                "segments": {
                    "rc-member-threads-a-lister-active": "RC Member - Awesome Sauce Club - Active Members",
                    "rc-member-threads-a-lister-inactive": "RC Member - Awesome Sauce Club - Inactive Members"
                }
            },
            "name": "Awesome Sauce Club",
						"program_type": "paid_recurring",
            "status": "enabled",
            "tag": "awesome-sauce-club",
            "updated_at": "2022-04-13T20:16:08+00:00"
        }
    ]
}

Need Help? Contact Us