Membership
Get all membership records for the user
Section titled “Get all membership records for the user”A typical configuration will have a single active membership record and a number of historic (lapsed) records. However, some configurations allow for multiple active memberships. If you are seeking to determine the membership status of a user, check your configuration, but usually it is sufficient to look for the first active membership.
http https://api.sheepcrm.com/api/v1/$FLOCK/user/{username}/membership/ "Authorization: Bearer $APP_API_TOKEN"
HTTP/1.1 200 OK{ "List of all memberships"}Create a membership record
Section titled “Create a membership record”| Parameter | Required | Description |
|---|---|---|
| membership_type | Yes | The URI of the membership type to create |
| start_date | No | When the membership should start (default: today) |
| amount | No | Membership price (if not the list price) |
| currency | No | Membership currency (if not the list currency) |
| status | No | Starting status for the membership |
| member_org | No | Use to create an organisational membership for the member |
http POST https://api.sheepcrm.com/api/v1/$FLOCK/user/{username}/membership/ "Authorization: Bearer $APP_API_TOKEN" membership_type=/example/membership_type/1234abc/
HTTP/1.1 201 CREATED{
}A single membership record
Section titled “A single membership record”http https://api.sheepcrm.com/api/v1/$FLOCK/user/{username}/membership/{membership_uid}/ "Authorization: Bearer $APP_API_TOKEN"
HTTP/1.1 200 OK{ "Single Membership"}Linked members for a membership
Section titled “Linked members for a membership”http https://api.sheepcrm.com/api/v1/$FLOCK/user/{username}/membership/{membership_uid}/linked/ "Authorization: Bearer $APP_API_TOKEN"
HTTP/1.1 200 OK{ ...}Single linked member for a membership
Section titled “Single linked member for a membership”http https://api.sheepcrm.com/api/v1/$FLOCK/user/{username}/membership/{membership_uid}/linked/{link_uid}/ "Authorization: Bearer $APP_API_TOKEN"
HTTP/1.1 200 OK{ ...}