POST member_services/Membership?isNew={isNew}&extendNewRenewals={extendNewRenewals}

This method allows the creation of new memberships and transaction records indicating the purchase of a membership. Posted memberships should only contain 'core' fields, the remaining fields will be generated internally.

Requires: HTTPS, Basic Auth.

Return Codes:

Created - Memberships created.

Bad Request - Supplied membership objects were invalid.

Request Information

Parameters

NameDescriptionAdditional information
newMemberships
A list of membership core objects to be created. 
            MemberCode: Required, Int 
            TypeCode: Required, Int 
            Cost: Required, Decimal 
            Tax: Required, Decimal 
            Paid: Required, Decimal 
            JoinDate: Recommended, DateTime 
            ExpiryDate: Recommended, DateTime 
            IsGift: Optional, default: false, Boolean 
            PurchaserRenewal:  Optional, default: false, Boolean 
            PackageID:  Optional, default: null, String(20) 
            PaymentGatewayReference: Optional, default: null, String(200)

Define this parameter in the request body.

isNew
Indicates whether posted memberships are new or renewals.

Define this parameter in the request URI.

extendNewRenewals
If set to true, new memberships that are added as part of a package renewal will be extended to expire on the same day as the existing memberships.

Define this parameter in the request URI.

Request body formats

application/json, text/json

Sample:
[
  {
    "MemberCode": 1,
    "TypeCode": 2,
    "Cost": 3.0,
    "Tax": 4.0,
    "Paid": 5.0,
    "JoinDate": "2026-04-02T18:29:47.196594-05:00",
    "ExpiryDate": "2026-04-02T18:29:47.196594-05:00",
    "IsGift": true,
    "PurchaserRenewal": true,
    "PackageID": "sample string 6",
    "PaymentGatewayReference": "sample string 7",
    "Coupon": {
      "CouponCode": "sample string 1",
      "DiscountAmount": 2.0,
      "StockID": 3
    },
    "CardDiscount": {
      "DiscountAmount": 1.0,
      "StockID": 2
    }
  },
  {
    "MemberCode": 1,
    "TypeCode": 2,
    "Cost": 3.0,
    "Tax": 4.0,
    "Paid": 5.0,
    "JoinDate": "2026-04-02T18:29:47.196594-05:00",
    "ExpiryDate": "2026-04-02T18:29:47.196594-05:00",
    "IsGift": true,
    "PurchaserRenewal": true,
    "PackageID": "sample string 6",
    "PaymentGatewayReference": "sample string 7",
    "Coupon": {
      "CouponCode": "sample string 1",
      "DiscountAmount": 2.0,
      "StockID": 3
    },
    "CardDiscount": {
      "DiscountAmount": 1.0,
      "StockID": 2
    }
  },
  {
    "MemberCode": 1,
    "TypeCode": 2,
    "Cost": 3.0,
    "Tax": 4.0,
    "Paid": 5.0,
    "JoinDate": "2026-04-02T18:29:47.196594-05:00",
    "ExpiryDate": "2026-04-02T18:29:47.196594-05:00",
    "IsGift": true,
    "PurchaserRenewal": true,
    "PackageID": "sample string 6",
    "PaymentGatewayReference": "sample string 7",
    "Coupon": {
      "CouponCode": "sample string 1",
      "DiscountAmount": 2.0,
      "StockID": 3
    },
    "CardDiscount": {
      "DiscountAmount": 1.0,
      "StockID": 2
    }
  }
]

Response Information

Response body formats

application/json, text/json

Sample:
{
  "MembershipResponse": [
    {
      "MemberCode": 1,
      "TypeCode": 2,
      "Cost": 3.0,
      "Tax": 4.0,
      "Paid": 5.0,
      "JoinDate": "2026-04-02T18:29:47.212217-05:00",
      "ExpiryDate": "2026-04-02T18:29:47.212217-05:00",
      "IsGift": true,
      "PurchaserRenewal": true,
      "PackageID": "sample string 6",
      "PaymentGatewayReference": "sample string 7",
      "Coupon": {
        "CouponCode": "sample string 1",
        "DiscountAmount": 2.0,
        "StockID": 3
      },
      "CardDiscount": {
        "DiscountAmount": 1.0,
        "StockID": 2
      }
    },
    {
      "MemberCode": 1,
      "TypeCode": 2,
      "Cost": 3.0,
      "Tax": 4.0,
      "Paid": 5.0,
      "JoinDate": "2026-04-02T18:29:47.212217-05:00",
      "ExpiryDate": "2026-04-02T18:29:47.212217-05:00",
      "IsGift": true,
      "PurchaserRenewal": true,
      "PackageID": "sample string 6",
      "PaymentGatewayReference": "sample string 7",
      "Coupon": {
        "CouponCode": "sample string 1",
        "DiscountAmount": 2.0,
        "StockID": 3
      },
      "CardDiscount": {
        "DiscountAmount": 1.0,
        "StockID": 2
      }
    },
    {
      "MemberCode": 1,
      "TypeCode": 2,
      "Cost": 3.0,
      "Tax": 4.0,
      "Paid": 5.0,
      "JoinDate": "2026-04-02T18:29:47.212217-05:00",
      "ExpiryDate": "2026-04-02T18:29:47.212217-05:00",
      "IsGift": true,
      "PurchaserRenewal": true,
      "PackageID": "sample string 6",
      "PaymentGatewayReference": "sample string 7",
      "Coupon": {
        "CouponCode": "sample string 1",
        "DiscountAmount": 2.0,
        "StockID": 3
      },
      "CardDiscount": {
        "DiscountAmount": 1.0,
        "StockID": 2
      }
    }
  ],
  "ReceiptNumber": 1
}