Glue Up API
User CollectionEvent CollectionSubscription CollectionMembership CollectionFinance Collection
User CollectionEvent CollectionSubscription CollectionMembership CollectionFinance Collection

    Glue Up API

    Introduction

    This is the Glue Up open API v2 document, it includes 5 business collections:

    • User Collection
    • Event Collection
    • Subscription Collection
    • Membership Collection
    • Finance Collection

    Click on any API, you can easily try out with your specific parameters.


    API Request Structure

    URI

    From Apiary console, we try out APIs on apidemo server. Note that in your integration code, please use the corresponding live server where your organization is on, with the public / private key we provided. Please do not test in Apiary with the keys of live server, otherwise unexpected errors will occur.

    • API integration server URI:

      • https://api-demo-story.glueup.com/v2/
    • Live server URI:

      • https://api-services.glueup.cn/v2/
      • https://api-services.glueup.com/v2/
      • https://api.glueup.ru/v2/

    Header

    Here is an example of an API request header.

    a: v=1.0;k=springfield_demo;ts=1382312423124;d=213213
    token: WnComsVP_DTky7RUXWhwhDYSdcFfCeSv2UiFIAbqP0V1uuILmESL_0l6WVQqVWyamArQWz5IHOeo9UsSr9PV1I1SOrnPuoqU42Ul_EYFe2z12MzZIDlWjQ3H1TuLdujI
    

    Parameters - a

    a is a required parameter in header for each API

    • v: 1.0 (client version)
    • k: springfield_demo (public key, change for the API account)
    • ts: 1382312423124 (timestamp of now)
    • d: 213213 (digest, a calculated string with following parameters)
      • publicKey: springfield_demo (change for the proper API account)
      • privateKey: MFwCAQACEADDpHP6QMQ9YDFqr/3N9EsCAwEAAQIPeUcOpglUHO5v5ZnRBu1RAggP+NdjEftxPQIIDD/CPCfRxCcCB3R7VlQt0JUCCAQQSvIGC9NVAggJiEGjTIKpjg== (change for the API account)
      • requestMethod: GET / POST / PUT / DELETE (change for different API)
      • version: 1.0 (client version)
      • time: 1382312423124 (timestamp of now)

    Here is a sample code of generating parameter d (digest) in Java.

    import org.joda.time.DateTime;
    import javax.crypto.Mac;
    import javax.crypto.spec.SecretKeySpec;
    import org.apache.commons.codec.binary.Hex;
    
    public class Helper {
        public static String getDigest(String publicKey, String privateKey, String requestMethod, String version) {
            String result = null;
            String ALGORITHM = "HmacSHA256";
            long time = DateTime.now(DateTimeZone.UTC).getMillis();
            StringBuffer baseString = new StringBuffer(requestMethod);
            baseString.append(publicKey);
            baseString.append(version);
            baseString.append(nowAsDateTime().getMillis());
            SecretKeySpec signingKey = new SecretKeySpec(privateKey.getBytes(), ALGORITHM);
        
            try {
                Mac mac = Mac.getInstance(ALGORITHM);
                mac.init(signingKey);
                result = Hex.encodeHexString(mac.doFinal(baseString.toString().getBytes()));
            }
            catch ( Exception e ) {
                log.error("Exception in getDigest()", e);
                throw new RuntimeException(e);
            }
            return result;
        }
    }
    

    Parameters - token

    • token is a user session token returned by user login action, it's required by user related APIs.

    Body

    Here is an example of a JSON-format body of an API request.

    {
        "projection": [],
        "offset": 0, 
        "limit": 5,
        "order": {
            "startDateTime": "desc", 
            "title": "asc"
        },
        "filter": [
            {
                "projection":"name",
                "operator":"eq",
                "values": ["GlueUp"]
            }
        ],
        "search": {
            "fields":["givenName","familyName","emailAddress"],
            "value":"Test",
            "fullText":true
        },
        "order": {
            "startDateTime": "asc"
        },
        "language": {
            "code": "en"
        }
    }
    

    Pagination

    • Provide the offset and limit in order to retrieve a limited amount of items.

    Order

    • Let you order the requested list using the properties available.
    • You can add more properties to order with more criteria.
    • Specify the order by using either ASC or DESC.

    Filter

    • Let you filter the requested list using the properties available.
    • For each filters, you need to specify a valid projection, the wanted operator and the values as an array.

    Search

    • Let you search the requested list using the properties available.

    List of available operators

    OperatorDescription
    eqEqual
    neNot equal
    gtGreater than
    geGreater than or equal
    ltLess than
    leLess than or equal
    lkLike
    nlNot like
    blNull
    nbNot null
    stStarts with
    edEnds with
    inIs in
    anyOne of

    API Response Structure

    Body

    Here is an example of a JSON-format return of an API request. We will review each property and how to use them.

    {
        "code": 200, 
        "data": {
            "value": [
                "..."
            ], 
            "errors": [
                {
                    "code": -1000, 
                    "messages": [
                        "Invalid email format."
                    ]
                }
            ], 
            "warnings": [
                {
                    "code": -2001, 
                    "messages": [
                        "[collaboratorCategories] is not a projectable property"
                    ]
                }
            ], 
            "metadata": {
                "pagination": {
                    "total": 15
                }
            }
        }
    }
    

    Code

    • The code is the HTTP status code from the request.
    • It is use to provide a description on the result of the request.

    Common used HTTP Status Codes:

    CodeTitleDescription
    200OKStandard response for successful HTTP requests.
    201CreatedThe request has been fulfilled and resulted in a new resource being created.
    400Bad RequestThe request cannot be fulfilled due to bad syntax.
    401UnauthorizedThe request was a valid request, but the server is refusing to respond to it.
    403ForbiddenThe request was a valid request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference.
    404Not FoundThe requested resource could not be found.
    500Internal Server ErrorA generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

    Value

    • "value" contains the content requested.

    Errors

    • If you receive “errors”, it indicate a failure.
    • It will contain an error code and a message to describe the problem.

    Warnings

    • If you receive “warnings”, it denotes a side-effect caused by the service that could potentially alter user experience, but it is not an indication of failure.
    • It will contain an error code and a message to describe the problem.

    Metadata

    • It contains the pagination count to know the total number of items for this specific request.

    Model Formats

    Event Model

    Notes : The event model contains more properties that are used in the administration section.
    If you need details on other properties and/or miss an important one, please contact us.

    Sample Code:

    {
        "id": 937, 
        "language": {
            "code": "en"
        }, 
        "defaultLanguage": {
            "code": "en"
        }, 
        "title": "Test Edit default Ticket", 
        "startDateTime": 1453345200000, 
        "endDateTime": 1459418400000, 
        "venueInfo": {
            "id": 937, 
            "venueReusable": false, 
            "zoom": 14, 
            "name": "Soho", 
            "city": [ ], 
            "cityName": "Bengaluru", 
            "country": {
                "code": "IN", 
                "name": "India"
            }, 
            "latitude": 12.9731, 
            "longitude": 77.592385
        }, 
        "eventRole": {
            "code": "ORGNZ", 
            "name": "Lead Organizer"
        }, 
        "published": true
    }
    
    
    Property Type Description Notes
    id int Event identifier.
    title string Event title.
    subTitle string Event subtitle.
    summary text Event summary.
    startDateTime timestamp Start date and time of the event.
    The startDateTime and endDateTime timestamps are in the timezone UTC+08:00, regardless of the timezone specified in venueInfo.
    Example:
    // Java
    LocalDateTime startDateTimeLocal = 
        ZonedDateTime.ofInstant(
        Instant.ofEpochMilli(startDateTime),
        ZoneId.ofOffset("UTC", 
            ZoneOffset.ofHours(8))
        ).toLocalDateTime();
            
    endDateTime timestamp End date and time of the event.
    venueInfo Location Model Event venue informations. Use the location model format. Please see below.
    eventRole Reference Data Model Role of the organization that created the event. Use the Reference Data model format. Please see below.
    eventType Reference Data Model Type of the event. Use the Reference Data model format. Please see below.
    industry Reference Data Model Industry of the event. Use the Reference Data model format. Please see below.
    internalContact Person Model Person that is responsible for the event. Used by the organization internal staff. Use the Reference Data model format. Please see below.
    publicContact Person Model Person that is responsible for the event. Used for public information. Use the Reference Data model format. Please see below.
    defaultLanguage Reference Data Model The main language selected when the event was created. Use the Reference Data model format. Please see below.
    language Reference Data Model The current language retrieved. Use the Reference Data model format. Please see below.
    openToPublic boolean If that property is true, the event is public and will be displayed on the organization public page.
    published boolean If that property is true, the event is published and so accessible from the event public page.
    currencies Reference Data Model List of available currencies for the purchase of ticket for that event. Use the Reference Data model format. Please see below.

    Location Model

    The Location Model is used to describe an address such as the event venue.

    "venueInfo": {
        "name": "EB Office", 
        "streetAddress": "Guanghua Lu SOHO", 
        "cityName": "Beijing", 
        "province": "Beijing", 
        "zipCode": "10000", 
        "country": {
            "code": "CN", 
            "name": "China"
        }, 
        "info": "Add."
    }
    
    PropertyTypeDescriptionNotes
    namestringThe location name.
    streetAddresstextThe location full address.
    cityNamestringThe location city.
    provincestringThe location province.
    countryReference Data ModelThe location country.
    zipCodestringThe location zip code.
    infotextThe location extra informations. Can be use for directions etc…

    Membership Company Model

    If you need details on other properties and/or miss an important one, please contact us.

    {
        "featured": true,
        "membershipId": 78,
        "startDate" : 1482487597000, 
        "adminContact":{
            "givenName" : "John",
            "familyName" : "Doe",
            "emailAddress": {
                "value": "john.doe@glueup.com"
            }
        }
        "id": 21323,
        "industryCode": "INVEST",
        "address": {
          "streetAddress": "Guang Hua Lu",
          "cityName": "Beijing",
          "province": "Beijing",
          "zipCode": "100000",
          "country": {
            "code": "CN"
          }
        },
        "phone": {
          "value": "+86 13456789000"
        },
        "groups": {
          "value": {
            "value": "event"
          }
        },
        "image": {
          "filename": "64e2a82e-8ec0-4417-a584-b3d02f541383.png",
          "id": "64e2a82e-8ec0-4417-a584-b3d02f541383",
          "uri": "/resources/public/images/square/::size::/64e2a82e-8ec0-4417-a584-b3d02f541383.png"
        },
        "name": "GlueUp",
        "fax": {
          "value": "+86 13456789000"
        },
        "companyWebsiteAddress": "www.glueup.com",
        "members": [
          {
            "id": 22183,
            "phone": {
              "value": "+86 13456789000"
            },
            "givenName": "John",
            "familyName": "Doe",
            "positionTitle": "Engineer",
            "image": {
              "filename": "64e2a82e-8ec0-4417-a584-b3d02f541383.png",
              "id": "64e2a82e-8ec0-4417-a584-b3d02f541383",
              "uri": "/resources/public/images/square/::size::/64e2a82e-8ec0-4417-a584-b3d02f541383.png"
            }
          }
        ]
    }
    
    PropertyTypeDescriptionNotes
    featurebooleanIs featured.
    membershipIdintMembership ID.
    startDatetimestampMembership start date.
    adminContactMember ModelPrimary member.
    idintCompany ID.
    industryCodestringIndustry Code.
    addressLocation ModelCompany address.
    phonephoneCompany phone.
    imageImage ModelCompany logo.
    namestringCompany name.
    faxphoneCompany fax.
    companyWebsiteAddressstringCompany website.
    membersMember ModelCompany members

    Membership Member Model

    If you need details on other properties and/or miss an important one, please contact us.

    {   
        "membership" : {
            "id" : 78,
            "startDate" : 1482487597000, 
            "featured": true,
            "membershipType":{
                "id": 56,
                "title": Entrepreneurs,
                "type": People
            } 
        },
        "individualMember" : {
            "id": 132,
            "membershipId": 78,
            "image": {
                  "filename": "64e2a82e-8ec0-4417-a584-b3d02f541383.png",
                  "id": "64e2a82e-8ec0-4417-a584-b3d02f541383",
                  "uri": "/resources/public/images/square/::size::/64e2a82e-8ec0-4417-a584-b3d02f541383.png"
                },
            "givenName" : "John",
            "familyName" : "Doe",
            "companyName" : "Eventbank",
            "postionTitle" : "Developer",
            "industry": {
                  "code": "CONSLT"
            },
            "address": {
                "streetAddress": "Guang Hua Lu",
                "cityName": "Beijing",
                "province": "Beijing",
                "zipCode": "100000",
                "country": {
                    "code": "CN"
                }
             },
            "emailAddress": {
                "value": "john.doe@glueup.com"
            },
            "phone": {
                "value": "+86 15201516676"
            },
        }
    }
    

    Membership Member Model include two model, Membership Model and IndividualMember Model.

    • Membership Model
    PropertyTypeDescriptionNotes
    idintMembership ID.
    startDatetimestampMembership start date.
    featurebooleanIs featured.
    membershipTypeintMembership Type.
    • IndividualMember Model
    PropertyTypeDescriptionNotes
    idbooleanMember ID.
    membershipIdintMembership ID.
    imageImage ModelMember profile picture.
    givenNameMember ModelMember given name.
    familyNameintMember family name.
    companyNamestringMember company name.
    postionTitleLocation ModelMember position title.
    industryphoneIndustry code reference.
    addressImage ModelMember address.
    emailAddressstringMember email.
    phonephoneMember phone.

    Membership Type Model

    Sample Code:

    {
        "id": 702,
        "organizationId": 2040,
        "title": "Membership Type Name eg.",
        "internalTitle": "Internal Membership Type Name eg.",
        "type": "People",
        "description": "<p>Membership Description eg.</p>",
        "status": "Active",
        "approvalRequired": true,
        "renewalApprovalRequired": true,
        "renewalConfirmRequired": true,
        "memberApprovalRequired": false,
        "activationRequired": true,
        "index": 4,
        "defaultLanguageCode": "en",
        "languageCode": "en",
        "renewalCreationPeriod": 30,
        "gracePeriod": 30,
        "gracePeriodEnabled": true,
        "showInDirectory": true,
        "createdOn": 1572257697000,
        "lastModified": 1572257992000,
        "activeVersions": [ ... ],
        "public": true
    }
    
    PropertyTypeDescription
    idIntMembership type id
    organizationIdIntOrganization id
    titleStringShow for customer
    internalTitleStringInternal title for staff
    typeMembershipTypeEnumCompany, People
    descriptionStringDescription for this membership type
    statusMembershipTypeStateEnumDraft, Active, Inactive, Recycled
    approvalRequiredBooleanIs this membership type need approval
    renewalApprovalRequiredBooleanIs renewal need staff approval
    renewalConfirmRequiredBooleanIs renewal need staff confirm
    memberApprovalRequiredBooleanIs member required approval
    activationRequiredBooleanIs activation need manually do
    indexIntList order
    defaultLanguageCodeStringDefault language
    languageCodeStringLanguage
    publicBooleanIs public membership type
    renewalCreationPeriodIntRenewal allows the creation time before the end of the membership (day)
    gracePeriodIntGrace Period time (day)
    gracePeriodEnabledBooleanIs enable grace period
    showInDirectoryBooleanShould it show in membership directory
    createdOnLongCreated time in epoch milli
    lastModifiedLongLast modified time in epoch milli
    activeVersionsList<MembershipTypeVersion>The active membership type version, See Membership Type Version Model
    • Membership Type Version Model

    Sample Code:

    {
        "organizationId": 2040,
        "membershipTypeId": 702,
        "version": 1,
        "status": "Current",
        "duration": 12,
        "memberLimit": 0,
        "defaultCurrencyCode": "CNY",
        "free": false,
        "additionalMembersAllowed": false,
        "additionalMembersFree": true,
        "additionalMembersLimit": 0,
        "extraMembersPriceEnabled": false,
        "newTermFixedDate": true,
        "newTermFixedDay": 1,
        "newTermFixedMonth": "JANUARY",
        "proRataEnabled": true,
        "proRataStartFrom": "JANUARY",
        "proRataTermSection": "Month",
        "proRataPriceRounding": "Current",
        "crossTermEnabled": true,
        "crossTermPeriod": 30,
        "crossTermExcludeCurrentPrice": true,
        "createdOn": 1572257697000,
        "lastModified": 1572257992000,
        "prices": [ ... ],
        "taxes": [ ... ],
        "invoice": { ... },
        "extraFee": { ... },
        "discount": { ... },
        "additionalMembersPrices": [ ... ],
        "extraMembersPrices": [ ... ]
    }
    
    PropertyTypeDescription
    organizationIdIntOrganization id
    membershipTypeIdIntMembership type id
    versionIntVersion
    statusMembershipTypeVersionStateEnumDraft, Scheduled, InProgress, Current, Past
    schedulerTimeLongPlanned effective time
    durationIntHow long dose this membership type version effect
    memberLimitIntMember limit count
    defaultCurrencyCodeStringDefault currency
    freeBooleanIs free
    additionalMembersAllowedBooleanIs allow additional member
    additionalMembersFreeBooleanAdditional member fee
    additionalMembersLimitIntAdditional member count limit
    extraMembersPriceEnabledBooleanExtra members price enabled or not
    newTermFixedDateBooleanNew term fixed date
    newTermFixedDayByteNew term fixed day
    newTermFixedMonthMonthNew term fixed moth
    proRataEnabledBooleanIs Pro Rata Enabled
    proRataStartFromMonthPro Rata Start From
    proRataTermSectionProRataTermSectionEnumPro Rata Term Section Month, Quarter, Biannual
    proRataPriceRoundingProRataPriceRoundingEnumPro Rata Price Rounding Current, Next, Closest
    crossTermEnabledBooleanCross term enabled
    crossTermPeriodShortCross term period
    crossTermExcludeCurrentPriceBooleanCross term exclude current price
    existingApplicationsMembershipTypeVersionOptionsEnumNow, OnScheduledTime, No
    newApplicationsMembershipTypeVersionOptionsEnumNow, OnScheduledTime, No
    existingRenewalsMembershipTypeVersionOptionsEnumNow, OnScheduledTime, No
    newRenewalsMembershipTypeVersionOptionsEnumNow, OnScheduledTime, No
    crossTermApplicableBooleanCross term applicable
    proRataCalculationDateLongPro Rata Calculation Date
    currentStartDateLongCurrent start date
    nextStartDateLongNew start date
    createdOnLongCreated time in epoch milli
    lastModifiedLongLast modified time in epoch milli
    pricesList<Price>Price list, See Price Model
    taxesList<MembershipTypeTax>Tax list, See Membership Type Tax Model
    invoiceMembershipTypeInvoiceInvoice info, See Membership Type Invoice Model
    extraFeeMembershipTypeChargeExtra fee info, See Membership Type Charge Model
    discountMembershipTypeChargeDiscount info, See Membership Type Charge Model
    chapterPriceTypeMembershipTypeChapterPriceTypeChapter price type Fixed, Volume, Graduated
    chaptersMembershipTypeChapterPriceChapters and price(Fixed) info, See Membership Type Chapter Price Model
    chapterPriceRulesMembershipTypeChapterPriceRuleChapters price rule(Volume, Graduated) list, See Membership Type Chapter Price Rule Model
    additionalMembersPricesList<Price>Additional members prices list, See Price Model
    extraMembersPricesList<Price>Extra members price list, See Price Model
    • Membership Type Chapter Price Model

    The price property only exists if chapter price type is Fixed.

    Sample Code:

    {
      "price": {
        "currency": {
          "code": "USD"
        },
        "value": 100
      },
      "chapterId": 2660
    }
    
    PropertyTypeDescription
    price-the fixed price info of this chapter
    chapterIdIntegerchapter organization id
    • Membership Type Chapter Price Rule Model

    This model only for volume and graduated chapter price type, See Membership Type Chapter Price Model for fixed price info.

    Sample Code:

    {
      "price": {
        "currency": {
          "code": "USD"
        },
        "value": 100
      },
      "minChapterCount": 1,
      "maxChapterCount": 1
    }
    
    PropertyTypeDescription
    price-the price info of this rule
    minChapterCountIntegerminimum chapter count in this rule
    maxChapterCountIntegermaximum chapter count in this rule
    • Membership Type Tax Model

    Sample Code:

    {
        "membershipTypeId": 371,
        "membershipTypeVersion": 1,
        "internalName": "Test",
        "title": "Test",
        "internalTitle": "Test",
        "percentage": 22,
        "applyToAll": true,
        "publicName": "Test",
        "organizationId": 141,
        "id": 26
    }
    
    PropertyTypeDescription
    membershipTypeIdIntegerMembership type id
    membershipTypeVersionIntegerMembership type version
    internalNameStringInternal name
    titleStringTitle
    internalTitleStringInternal title
    percentageBigDecimalPercentage
    applyToAllBooleanApply to all
    publicNameStringPublic name
    organizationIdIntegerOrganization id
    idIntegerId
    • Membership Type Invoice Model

    Sample Code:

    {
        "isInvoiceApplicantCharged": true,
        "isBTInvoiceEnabled": false,
        "btInvoiceChargePercentage": 0.00,
        "isVATGeneralInvoiceEnabled": true,
        "vatGeneralInvoiceChargePercentage": 1.00,
        "vatGeneralInvoiceMinimumAmount": 2.00,
        "isVATSpecialInvoiceEnabled": true,
        "vatSpecialInvoiceChargePercentage": 3.00,
        "vatSpecialInvoiceMinimumAmount": 4.00
    }
    
    PropertyTypeDescription
    isInvoiceApplicantChargedBooleanIs invoice application charged
    isBTInvoiceEnabledBooleanIs BT invoice enable
    btInvoiceChargePercentageBigDecimalBT invoice charge percentage
    isVATGeneralInvoiceEnabledBooleanIs VAT General Invoice Enabled
    vatGeneralInvoiceChargePercentageBigDecimalVAT General Invoice Charge Percentage
    vatGeneralInvoiceMinimumAmountBigDecimalVAT General Invoice Minimum Amount
    isVATSpecialInvoiceEnabledBooleanIs VAT special Invoice Enabled
    vatSpecialInvoiceChargePercentageBigDecimalVAT special Invoice charge Percentage
    vatSpecialInvoiceMinimumAmountBigDecimalVAT special Invoice Minimum Amount
    • Price Model

    Sample Code:

    {
        "id": 2107,
        "currency": "CNY",
        "price": 33.00
    }
    
    PropertyTypeDescription
    idIntPrice Id
    currencyStringCurrency Code
    priceBigDecimalPrice
    • Membership Type Charge Model

    Sample Code:

    {
        "application": { ... },
        "renewal": { ... }
    }
    
    PropertyTypeDescription
    applicationMembershipTypeChargeDetailsMembership application charge details, See Membership Type Charge Details Model
    renewalMembershipTypeChargeDetailsMembership renewal charge details, See Membership Type Charge Details Model
    • Membership Type Charge Details Model

    Sample Code:

    {
        "percentage": 0.02,
        "prices": [ ... ],
        "proRataEnabled": false
    }
    
    PropertyTypeDescription
    percentageBigDecimalMembership type charge percentage
    pricesList<Price>Membership type charge price info, See Price Model
    proRataEnabledBooleanIs pro Rata Enabled

    Person Model

    The Person model is used when you have a person type of information, like a user, a contact etc…

    "publicContact": {
        "givenName": "David", 
        "familyName": "Milo", 
        "phoneNumbers": [
            {
                "value": "+86 18612341234"
            }
        ], 
        "emailAddresses": [
            {
                "value": "david.milosevic@glueup.com"
            }
        ]
    }
    
    PropertyTypeDescriptionNotes
    givenNamestringPerson’s given name.
    familyNamestringPerson's family name.
    emailAddressesemailPerson's email.Returns a list of emails.
    phoneNumbersphonePerson’s phone.Returns a list of phones.

    Reference Data Model

    The Reference Data model is used to retrieve a list of a specific property options in a specific language.
    For example you can request the list of options for “eventType” in Chinese.

    "value": [
        {
            "code": "en", 
            "name": "English"
        }, 
        {
            "code": "zh", 
            "name": "中文"
        }
    ]
    
    PropertyTypeDescriptionNotes
    codestringUnique identifier for this option.
    namestringName in the requested language for this option.
    Built with