# Insert transaction

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

Endpoint: POST /slapi/clients/inserttransaction
Version: 0.0.1
Security: BasicAuthCredentials

## Security:

  - `BasicAuthCredentials` (unknown)
    http basic

## Request fields (application/json):

  - `clientNumber` (string)
    Example: 0000000001

  - `storecode` (string)
    Example: 0000000001

  - `employeeNumber` (string)
    Example: 00000000001

  - `lineItems` (array)

  - `lineItems.tranType` (string)
    Example: R

  - `lineItems.description` (string)
    Example: Lotion

  - `lineItems.pricePerUnit` (number)
    Example: 19.99

  - `lineItems.units` (integer)
    Example: 2

  - `lineItems.tax1` (number)
    Example: 2

  - `lineItems.tax2` (number)
    Example: 0

  - `lineItems.tax3` (number)
    Example: 0

  - `lineItems.amount` (number)
    Example: 39.98

  - `lineItems.membershipId` (string)

  - `lineItems.packageId` (string)

  - `lineItems.productNumber` (string)
    Example: 0000000001

  - `lineItems.giftCertNo` (string)

  - `lineItems.tanTax` (number)
    Example: 1

## Response 201:

  - `201` (unknown)
    Payment inserted

## Response 201 fields (applicaiton/json):

  - `message` (string)
    Example: Transaction inserted successfully

  - `receiptNo` (string)
    Example: 0000000020

## Response 400:

  - `400` (unknown)
    Client not found

## Response 400 fields (applicatoin/json):

  - `error` (string)

  - `message` (string)

