Sales Service


Click here for a complete list of operations.

addSaleSimple

Makes a simple inventory sale. Returns a SaleID on success or a -1 and error message on failure. EmployeeID maps to a TrainerID in the MindBody Online database schema. SaleDateTime must include both a date and time. LocationID should be 1 for the default location, 98 for the online store or 0 for all locations (used in the Sales report to display location of sale). Recorded total will be ((Product Price * Product Quantity) * (1 + Tax rate)). Product Price and Tax Rate are retrieved from the database using the passed BarcodeID.

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
Card_ID:
EmployeeID:
SaleDateTime:
PaymentMethod:
PaymentAmount:
LocationID:
BarcodeID:
ProductQty:
Sourcename:
Password:
StudioID:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /0_4/SaleService.asmx HTTP/1.1
Host: clients.mindbodyonline.com/api
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://clients.mindbodyonline.com/API/0_4/addSaleSimple"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <addSaleSimple xmlns="http://clients.mindbodyonline.com/API/0_4">
      <Card_ID>string</Card_ID>
      <EmployeeID>int</EmployeeID>
      <SaleDateTime>dateTime</SaleDateTime>
      <PaymentMethod>Cash or Check or Credit_Amex or Credit_VisaMC or Credit_Discover or Credit_ATM or Comp_Guest or Other or Trade or Account or Perkville or Return or ACH</PaymentMethod>
      <PaymentAmount>double</PaymentAmount>
      <LocationID>int</LocationID>
      <BarcodeID>string</BarcodeID>
      <ProductQty>int</ProductQty>
      <Sourcename>string</Sourcename>
      <Password>string</Password>
      <StudioID>int</StudioID>
    </addSaleSimple>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <addSaleSimpleResponse xmlns="http://clients.mindbodyonline.com/API/0_4">
      <addSaleSimpleResult>
        <Result>int</Result>
      </addSaleSimpleResult>
    </addSaleSimpleResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /0_4/SaleService.asmx HTTP/1.1
Host: clients.mindbodyonline.com/api
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <addSaleSimple xmlns="http://clients.mindbodyonline.com/API/0_4">
      <Card_ID>string</Card_ID>
      <EmployeeID>int</EmployeeID>
      <SaleDateTime>dateTime</SaleDateTime>
      <PaymentMethod>Cash or Check or Credit_Amex or Credit_VisaMC or Credit_Discover or Credit_ATM or Comp_Guest or Other or Trade or Account or Perkville or Return or ACH</PaymentMethod>
      <PaymentAmount>double</PaymentAmount>
      <LocationID>int</LocationID>
      <BarcodeID>string</BarcodeID>
      <ProductQty>int</ProductQty>
      <Sourcename>string</Sourcename>
      <Password>string</Password>
      <StudioID>int</StudioID>
    </addSaleSimple>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <addSaleSimpleResponse xmlns="http://clients.mindbodyonline.com/API/0_4">
      <addSaleSimpleResult>
        <Result>int</Result>
      </addSaleSimpleResult>
    </addSaleSimpleResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /0_4/SaleService.asmx/addSaleSimple?Card_ID=string&EmployeeID=string&SaleDateTime=string&PaymentMethod=string&PaymentAmount=string&LocationID=string&BarcodeID=string&ProductQty=string&Sourcename=string&Password=string&StudioID=string HTTP/1.1
Host: clients.mindbodyonline.com/api
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<Result_Int xmlns="http://clients.mindbodyonline.com/API/0_4">
  <Result>int</Result>
</Result_Int>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /0_4/SaleService.asmx/addSaleSimple HTTP/1.1
Host: clients.mindbodyonline.com/api
Content-Type: application/x-www-form-urlencoded
Content-Length: length

Card_ID=string&EmployeeID=string&SaleDateTime=string&PaymentMethod=string&PaymentAmount=string&LocationID=string&BarcodeID=string&ProductQty=string&Sourcename=string&Password=string&StudioID=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<Result_Int xmlns="http://clients.mindbodyonline.com/API/0_4">
  <Result>int</Result>
</Result_Int>