Post proposed order

POST /tp/v1/business-locations/{businessLocationId}/tax-breakdown

Returns the tax breakdown of a proposed order

Path parameters

  • businessLocationId integer(int64) Required

    the id of the businessLocation

    Minimum value is 1.

application/json

Body Required

  • accountProfileCode string

    A valid account profile code as setup for this business location.

  • items array[object]

    The items contained in this order

    Hide items attributes Show items attributes object
    • sku string Required

      A stock-keeping unit

      Maximum length is 25.

    • quantity number(double)

      Quantity of item to be ordered

    • subItems array[object]

      subitems applied to this item

      Hide subItems attributes Show subItems attributes object
      • sku string Required

        A stock-keeping unit

        Maximum length is 25.

      • quantity number(double)

        Quantity of sub-item to be added to the order item

Responses

  • 200 application/json

    Tax Breakdown

    Hide response attributes Show response attributes object
    • transactions array[object]
      Hide transactions attributes Show transactions attributes object
      • sku string

        A stock-keeping unit

        Maximum length is 25.

      • quantity number

        Quantity of the item on this transaction line

      • unitPrice number

        Cost of item

      • netAmount number

        Cost of transaction line before taxes are applied

      • grossAmount number

        Cost of transaction with all taxes applied

      • taxAmount number

        Cost of all taxes to be applied to this transaction line

    • taxLines array[object]
      Hide taxLines attributes Show taxLines attributes object
      • description string

        Description of the tax to print on the receipt

      • taxRate string

        Tax rate as configured, a decimal number encoded in a string, "1.20" means 20% tax

      • taxCode string

        Tax code as configured

      • taxName string

        Tax name as configured

      • netAmount number

        Cost of transaction line before taxes are applied

      • grossAmount number

        Cost of transaction with all taxes applied

      • taxAmount number

        Cost of all taxes to be applied to this transaction line

      • taxIncluded boolean
    • totalNetAmountInCents integer(int64)

      Total cost of order before taxes are applied

    • totalGrossAmountInCents integer(int64)

      Total cost of order after all taxes are applied

    • totalTaxAmountInCents integer(int64)

      Cost of all taxes due on the order

    • amountDue number

      Total cost of order in big decimal format

  • 400 */*

    Bad Request

    Hide response attributes Show response attributes object
    • status string

      Value is 400.

    • timestamp string(date-time)
    • message string
    • apiSubExceptions array[object]
      Hide apiSubExceptions attributes Show apiSubExceptions attributes object
      • field string
      • rejectedValue string
      • message string
  • 403 */*

    Forbidden

    Hide response attributes Show response attributes object
    • status string

      Value is 403.

    • timestamp string(date-time)
    • message string
    • apiSubExceptions array[object]
      Hide apiSubExceptions attributes Show apiSubExceptions attributes object
      • field string
      • rejectedValue string
      • message string
  • 404 */*

    Not Found

    Hide response attributes Show response attributes object
    • status string

      Value is 404.

    • timestamp string(date-time)
    • message string
    • apiSubExceptions array[object]
      Hide apiSubExceptions attributes Show apiSubExceptions attributes object
      • field string
      • rejectedValue string
      • message string
  • 503 */*

    Service Unavailable

    Hide response attributes Show response attributes object
    • status string

      Value is 503.

    • timestamp string(date-time)
    • message string
    • apiSubExceptions array[object]
      Hide apiSubExceptions attributes Show apiSubExceptions attributes object
      • field string
      • rejectedValue string
      • message string
POST /tp/v1/business-locations/{businessLocationId}/tax-breakdown
curl \
 --request POST 'https://api.trial.lsk.lightspeed.app/tp/v1/business-locations/45454565682155/tax-breakdown' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"accountProfileCode":"string","items":[{"sku":"string","quantity":42.0,"subItems":[{"sku":"string","quantity":42.0}]}]}'
Request examples
{
  "accountProfileCode": "string",
  "items": [
    {
      "sku": "string",
      "quantity": 42.0,
      "subItems": [
        {
          "sku": "string",
          "quantity": 42.0
        }
      ]
    }
  ]
}
Response examples (200)
{
  "transactions": [
    {
      "sku": "UGG-BB-PUR-06",
      "quantity": 42.0,
      "unitPrice": 42.0,
      "netAmount": 42.0,
      "grossAmount": 42.0,
      "taxAmount": 42.0
    }
  ],
  "taxLines": [
    {
      "description": "string",
      "taxRate": "string",
      "taxCode": "string",
      "taxName": "string",
      "netAmount": 42.0,
      "grossAmount": 42.0,
      "taxAmount": 42.0,
      "taxIncluded": true
    }
  ],
  "totalNetAmountInCents": 42,
  "totalGrossAmountInCents": 42,
  "totalTaxAmountInCents": 42,
  "amountDue": 42.0
}
Response examples (400)
{
  "status": "400",
  "timestamp": "2025-05-04T09:42:00Z",
  "message": "string",
  "apiSubExceptions": [
    {
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}
Response examples (403)
{
  "status": "403",
  "timestamp": "2025-05-04T09:42:00Z",
  "message": "string",
  "apiSubExceptions": [
    {
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}
Response examples (404)
{
  "status": "404",
  "timestamp": "2025-05-04T09:42:00Z",
  "message": "string",
  "apiSubExceptions": [
    {
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}
Response examples (503)
{
  "status": "503",
  "timestamp": "2025-05-04T09:42:00Z",
  "message": "string",
  "apiSubExceptions": [
    {
      "field": "string",
      "rejectedValue": "string",
      "message": "string"
    }
  ]
}