# SunLync API (V2) API Definition

Open API Specificaitons for SunLync API V2

Version: 0.0.1

## Servers

Sandbox server
```
http://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

 - [GET /slapi/clients/clientdetails](https://sl-api.redocly.app/openapi/client/getclientdetails.md): Returns basic demographic information for a given client number
 - [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 /slapi/clients/commprefs](https://sl-api.redocly.app/openapi/client/getclientcommprefs.md): Returns communication preferences for a given client number
 - [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 /slapi/clients/clientpackages](https://sl-api.redocly.app/openapi/client/getclientpackages.md): Returns a list of packages for a given client number
 - [GET /slapi/clients/pointsbalance](https://sl-api.redocly.app/openapi/client/getclientpointsbalance.md): Returns points ledger balances for a given client number
 - [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 /slapi/clients/billinginfo](https://sl-api.redocly.app/openapi/client/getbillinginfo.md): Returns a list of client billing accounts for a given client number
 - [GET /slapi/clients/geteftamounts](https://sl-api.redocly.app/openapi/client/geteftamounts.md): Returns membership billing amounts
 - [GET /slapi/clients/getunfreezeamounts](https://sl-api.redocly.app/openapi/client/getunfreezeamounts.md): Returns membership unfreeze amounts
 - [GET /slapi/clients/search](https://sl-api.redocly.app/openapi/client/getclientsearch.md): Returns a list of clients
 - [GET /slapi/clients/marketsearch](https://sl-api.redocly.app/openapi/client/getmarketsearch.md): Returns a list clients from all markets
 - [GET /slapi/clients/transactionhistory](https://sl-api.redocly.app/openapi/client/getclienttranhistory.md): Returns a list trasnsactions for a given client number
 - [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
 - [GET /slapi/clients/getsharedpackages](https://sl-api.redocly.app/openapi/client/getsharedpackages.md): Returns a list of packages shared with a client by a given client number
 - [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
 - [POST /slapi/clients/updatedemographics](https://sl-api.redocly.app/openapi/client/postupdatedemographics.md): Field is only updated if a value is passed
 - [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, m
 - [POST /slapi/clients/insertcomment](https://sl-api.redocly.app/openapi/client/postinsertcomment.md): Inserts a client comment
 - [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 *
 - [POST /slapi/clients/insertpackage](https://sl-api.redocly.app/openapi/client/postinsertpackage.md): Inserts a client package * **storecode** is the storecode of the store location
 - [POST /slapi/clients/insertgiftcert](https://sl-api.redocly.app/openapi/client/postinsertgiftcert.md): Insert Gift Certificate
 - [POST /slapi/clients/freezemembership](https://sl-api.redocly.app/openapi/client/freezemembership.md): Freezes an active eft membership
 - [POST /slapi/clients/unfreezemembership](https://sl-api.redocly.app/openapi/client/unfreezemembership.md): Unfreezes a frozen eft membership
 - [POST /slapi/clients/activatemembership](https://sl-api.redocly.app/openapi/client/activatemembership.md): Activate a membership that is on hold
 - [POST /slapi/clients/upgrademembership](https://sl-api.redocly.app/openapi/client/upgrademembership.md): Upgrades an active eft membership
 - [POST /slapi/clients/downgrademembership](https://sl-api.redocly.app/openapi/client/downgrademembership.md): Downgrades an active eft membership
 - [POST /slapi/clients/postaccountledgerpayment](https://sl-api.redocly.app/openapi/client/postaccountledgerpayment.md): Post account ledger payment
 - [POST /slapi/clients/insertpoints](https://sl-api.redocly.app/openapi/client/insertpoints.md): Insert points
 - [POST /slapi/clients/updateclientcommpref](https://sl-api.redocly.app/openapi/client/updateclientcommpref.md): Update client communication preferences
 - [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
 - [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) *
 - [POST /slapi/clients/shareaffiliatedpackage](https://sl-api.redocly.app/openapi/client/shareaffiliatedpackage.md): Shares an affiliated package
 - [POST /slapi/clients/unshareaffiliatedpackage](https://sl-api.redocly.app/openapi/client/unshareaffiliatedpackage.md): Unshares an affiliated package
 - [POST /slapi/clients/cancelmembership](https://sl-api.redocly.app/openapi/client/cancelmembership.md): Cancels an active eft membership
 - [POST /slapi/clients/insertprofileanswers](https://sl-api.redocly.app/openapi/client/insertprofileanswers.md): Inserts spa profile answers
 - [POST /slapi/clients/addreferral](https://sl-api.redocly.app/openapi/client/addreferral.md): Add a referral
 - [POST /slapi/clients/generatewebdocument](https://sl-api.redocly.app/openapi/client/generatewebdocument.md): Generates a webdoc URL
## Configuration

 - [GET /slapi/packages/packagelist](https://sl-api.redocly.app/openapi/configuration/getpackagelist.md): Returns a list of sellable packages
 - [GET /slapi/stores/storelist](https://sl-api.redocly.app/openapi/configuration/getstorelist.md): Returns a list stores
 - [GET /slapi/memberships/eft](https://sl-api.redocly.app/openapi/configuration/geteftmembershipslist.md): Returns a list of sellable EFT memberships
 - [GET /slapi/memberships/noneft](https://sl-api.redocly.app/openapi/configuration/getnoneftmembershipslist.md): Returns a list of sellable NON-EFT memberships
 - [GET /slapi/memberships/eftdeducttypes](https://sl-api.redocly.app/openapi/configuration/geteftdeducttypes.md): Returns a list EFT deduction types
 - [GET /slapi/memberships/eftdrawdays](https://sl-api.redocly.app/openapi/configuration/geteftdrawdays.md): Returns a list of EFT draw days
 - [GET /slapi/setup/skintypes](https://sl-api.redocly.app/openapi/configuration/skintypes.md): Returns a list of configured skin types
 - [GET /slapi/setup/getstorewaitlist](https://sl-api.redocly.app/openapi/configuration/getstorewaitlist.md): Returns a list clients in wait list
 - [GET /slapi/setup/webdocs](https://sl-api.redocly.app/openapi/configuration/webdocs.md): Returns a list web documents
 - [GET /slapi/setup/paymenttypes](https://sl-api.redocly.app/openapi/configuration/getpaymenttypes.md): Returns a list of payment types by given storecode
 - [GET /slapi/setup/employees](https://sl-api.redocly.app/openapi/configuration/getemployees.md): Returns a list of active employees by given storecode
 - [GET /slapi/setup/getproducts](https://sl-api.redocly.app/openapi/configuration/getproducts.md): Returns a list of products by given storecode
 - [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 /slapi/setup/profilequestions](https://sl-api.redocly.app/openapi/configuration/profilequestions.md): Returns a list of profile questions
 - [POST /slapi/setup/adjustinventoryaftersale](https://sl-api.redocly.app/openapi/configuration/adjustinventoryaftersale.md): Reduces a product's on-hand quantity following a sale
## 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
 - [POST /slapi/users/resetpassword](https://sl-api.redocly.app/openapi/user/postresetpassword.md): Resets a user password
 - [POST /slapi/users/login](https://sl-api.redocly.app/openapi/user/postlogin.md): Validates a login and logs that the user has logged in
