# SunLync API (V2) API Definition Open API Specificaitons for SunLync API V2 Version: 0.0.1 License: ## Servers Sandbox server ``` https://sandbox.sunlync.net:9000 ``` ## Security ### BasicAuthCredentials Type: http Scheme: basic ## Download OpenAPI description [SunLync API (V2) API Definition](https://sl-api.redocly.app/_bundle/openapi.yaml) ## Client Client related endpoints ### Get client details - [GET /slapi/clients/clientdetails](https://sl-api.redocly.app/openapi/client/getclientdetails.md): Returns basic demographic information for a given client number ### Get ledger balances - [GET /slapi/clients/ledgerbalance](https://sl-api.redocly.app/openapi/client/getclientledgerbalances.md): Returns ledger balances for a given client number * Postive value amount owed * Negative value is amount of credit ### Get communication preferences - [GET /slapi/clients/commprefs](https://sl-api.redocly.app/openapi/client/getclientcommprefs.md): Returns communication preferences for a given client number ### Get client memberships - [GET /slapi/clients/clientmemberships](https://sl-api.redocly.app/openapi/client/getclientmemberships.md): Returns a list of EFT and non-eft memberships for a given client number ### Get client packages - [GET /slapi/clients/clientpackages](https://sl-api.redocly.app/openapi/client/getclientpackages.md): Returns a list of packages for a given client number ### Get points balance - [GET /slapi/clients/pointsbalance](https://sl-api.redocly.app/openapi/client/getclientpointsbalance.md): Returns points ledger balances for a given client number ### Get client points transactions - [GET /slapi/clients/getpointstransactions](https://sl-api.redocly.app/openapi/client/getpointstransactions.md): Returns a list of points transactions for a given client number and date range ### Get billing info - [GET /slapi/clients/billinginfo](https://sl-api.redocly.app/openapi/client/getbillinginfo.md): Returns a list of client billing accounts for a given client number ### Search clients - [GET /slapi/clients/search](https://sl-api.redocly.app/openapi/client/getclientsearch.md): Returns a list of clients ### Get client transaction history - [GET /slapi/clients/transactionhistory](https://sl-api.redocly.app/openapi/client/getclienttranhistory.md): Returns a list trasnsactions for a given client number ### Get affilicated package clients - [GET /slapi/setup/affiliatedpackageclients](https://sl-api.redocly.app/openapi/client/getaffiliatedpackageclients.md): Returns a list of clients sharing an affiliated package by given membership id ### Insert client - [POST /slapi/clients/insert](https://sl-api.redocly.app/openapi/client/postinsertclient.md): Inserts a client and returns client number * storecode is the storecode of the store location * empNo is the employee number of the employee inserting the client ### Update client demographics - [POST /slapi/clients/updatedemographics](https://sl-api.redocly.app/openapi/client/postupdatedemographics.md): Field is only updated if a value is passed ### Update billing info - [POST /slapi/clients/updatebillinginfo](https://sl-api.redocly.app/openapi/client/postupdatebillinginfo.md): Update billing info for a client - membershipId identifiies the membership the billing account is associated with - type must be one of the following values - CARD Credit card type, must include lastFour, expMonth, expYear. and tokenId. vaultToken is recommened when using the Cayan processor but is not reqruired. - CHECKING Checking account type, must include accountNo and routingNo - deductType must be a value returned by getEFTDeductTypes endpoint ### Insert client comment - [POST /slapi/clients/insertcomment](https://sl-api.redocly.app/openapi/client/postinsertcomment.md): Inserts a client comment ### Insert client membership - [POST /slapi/clients/insertMembership](https://sl-api.redocly.app/openapi/client/postinsertmembership.md): Inserts a client membership * storecode is the storecode of the store location * empNo is the employee number of the employee inserting the client * drawDay must be value returned by the getEFTDrawDays endpoint ### Insert gift certificate - [POST /slapi/clients/insertgiftcert](https://sl-api.redocly.app/openapi/client/postinsertgiftcert.md): Insert Gift Certificate ### Freeze membership - [POST /slapi/clients/freezemembership](https://sl-api.redocly.app/openapi/client/freezemembership.md): Freezes an active eft membership ### Unfreeze membership - [POST /slapi/clients/unfreezemembership](https://sl-api.redocly.app/openapi/client/unfreezemembership.md): Unfreezes a frozen eft membership ### Activate membership - [POST /slapi/clients/activatemembership](https://sl-api.redocly.app/openapi/client/activatemembership.md): Activate a membership that is on hold ### Upgrade membership - [POST /slapi/clients/upgrademembership](https://sl-api.redocly.app/openapi/client/upgrademembership.md): Upgrades an active eft membership ### Downgrade membership - [POST /slapi/clients/downgrademembership](https://sl-api.redocly.app/openapi/client/downgrademembership.md): Downgrades an active eft membership ### Post account ledger payment - [POST /slapi/clients/postaccountledgerpayment](https://sl-api.redocly.app/openapi/client/postaccountledgerpayment.md): Post account ledger payment ### Insert points - [POST /slapi/clients/insertpoints](https://sl-api.redocly.app/openapi/client/insertpoints.md): Insert points ### Update client communication preferences - [POST /slapi/clients/updateclientcommpref](https://sl-api.redocly.app/openapi/client/updateclientcommpref.md): Update client communication preferences ### Insert payment - [POST /slapi/clients/insertpayment](https://sl-api.redocly.app/openapi/client/insertpayment.md): Inserts a payment * Transaction must be saved first * Receipt number is returned when inserting transaction ### Insert transaction - [POST /slapi/clients/inserttransaction](https://sl-api.redocly.app/openapi/client/inserttransaction.md): Inserts a transaction * Supported transaction types: * R = Retail Sale (productNumber is required) * P = Package Sale (packageId is required) * M = Membership Sale (membershipId is required) * 1 = Membership Fee (membershipId is required) * G = Gift Certificate Sale (giftCertNo is required) Amount is total for line item before tax (pricePerUnit units) * Receipt number is returned and can be used when inserting a payment ### Shares an affiliated package - [POST /slapi/clients/shareaffiliatedpackage](https://sl-api.redocly.app/openapi/client/shareaffiliatedpackage.md): Shares an affiliated package ### Unshares an affiliated package - [POST /slapi/clients/unshareaffiliatedpackage](https://sl-api.redocly.app/openapi/client/unshareaffiliatedpackage.md): Unshares an affiliated package ### Cancel membership - [POST /slapi/clients/cancelmembership](https://sl-api.redocly.app/openapi/client/cancelmembership.md): Cancels an active eft membership ### Insert spa profile answers - [POST /slapi/clients/insertprofileanswers](https://sl-api.redocly.app/openapi/client/insertprofileanswers.md): Inserts spa profile answers ### Add a referral - [POST /slapi/clients/addreferral](https://sl-api.redocly.app/openapi/client/addreferral.md): Add a referral ### Generate webdoc URL - [POST /slapi/clients/generatewebdocument](https://sl-api.redocly.app/openapi/client/generatewebdocument.md): Generates a webdoc URL ## Configuration SunLync configuration related endpoints ### Get packages - [GET /slapi/packages/packagelist](https://sl-api.redocly.app/openapi/configuration/getpackagelist.md): Returns a list of sellable packages ### Get store list - [GET /slapi/stores/storelist](https://sl-api.redocly.app/openapi/configuration/getstorelist.md): Returns a list stores ### Get eft memberships - [GET /slapi/memberships/eft](https://sl-api.redocly.app/openapi/configuration/geteftmembershipslist.md): Returns a list of sellable EFT memberships ### Get non-eft memberships - [GET /slapi/memberships/noneft](https://sl-api.redocly.app/openapi/configuration/getnoneftmembershipslist.md): Returns a list of sellable NON-EFT memberships ### Get eft deduct types - [GET /slapi/memberships/eftdeducttypes](https://sl-api.redocly.app/openapi/configuration/geteftdeducttypes.md): Returns a list EFT deduction types ### Get eft draw days - [GET /slapi/memberships/eftdrawdays](https://sl-api.redocly.app/openapi/configuration/geteftdrawdays.md): Returns a list of EFT draw days ### Get skin types - [GET /slapi/setup/skintypes](https://sl-api.redocly.app/openapi/configuration/skintypes.md): Returns a list of configured skin types ### Get web documents - [GET /slapi/setup/webdocs](https://sl-api.redocly.app/openapi/configuration/webdocs.md): Returns a list web documents ### Get payment types - [GET /slapi/setup/paymenttypes](https://sl-api.redocly.app/openapi/configuration/getpaymenttypes.md): Returns a list of payment types by given storecode ### Get employees - [GET /slapi/setup/employees](https://sl-api.redocly.app/openapi/configuration/getemployees.md): Returns a list of active employees by given storecode ### Get products - [GET /slapi/setup/getproducts](https://sl-api.redocly.app/openapi/configuration/getproducts.md): Returns a list of products by given storecode ### Get slimcd credentials - [GET /slapi/setup/getslimcdcredentials](https://sl-api.redocly.app/openapi/configuration/getslimcdcredentials.md): Returns slimcd credentials by given storecode * type = POS - POS Credentials * type = EFT - EFT Credentials ### Get spa profile questions - [GET /slapi/setup/profilequestions](https://sl-api.redocly.app/openapi/configuration/profilequestions.md): Returns a list of profile questions ## User User related endpoints ### Register user - [POST /slapi/users/register](https://sl-api.redocly.app/openapi/user/postregisteruser.md): Registers a user and insert a client, returns client number and user ### Reset password - [POST /slapi/users/resetpassword](https://sl-api.redocly.app/openapi/user/postresetpassword.md): Resets a user password ### Login - [POST /slapi/users/login](https://sl-api.redocly.app/openapi/user/postlogin.md): Validates a login and logs that the user has logged in