Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsQuote Retail Sale
Search the full API reference Esc to close

Quote Retail Sale

Retail · REST API reference

Get support
POST/v1/facilities/{facility_id}/retail-sales/quote
Price a sale now, line by line, with tax. Writes nothing; send its total back as `expected_total`.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/retail-sales/quote' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "lines": [
    {
      "item_id": "00000000-0000-4000-8000-000000000001",
      "quantity": 1,
      "discount_amount": "0.00"
    }
  ],
  "lease_id": "00000000-0000-4000-8000-000000000001"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

facility_idpath · stringrequired

Format: uuid

Request body

application/json · Required

lease_idstring | null

The tenant's lease, for their tax exemption; null for a walk-in.

Format: uuid

Show lease_id schema
string | null

The tenant's lease, for their tax exemption; null for a walk-in.

Variant 1: string
string
Variant 2: null
null
linesSaleLineRequest[]required

The items and quantities. At least one.

Min items: 1

Show lines schema
discount_amountnumber | string

Dollars taken off the line at the till, at most its quantity times the unit price; tax is on what is left. Needs retail.discount.

Default: "0.00" · Minimum: 0 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show discount_amount schema
number | string

Dollars taken off the line at the till, at most its quantity times the unit price; tax is on what is left. Needs retail.discount.

Variant 1: number
number
Variant 2: string
string
item_idstringrequired

The catalog item sold.

Format: uuid

quantityintegerrequired

Units sold. Lines naming the same item are added together.

Minimum: 1

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "discount_amount": "<VALUE_MATCHING_PATTERN>",
    "lines": [
      {
        "discount_amount": "<VALUE_MATCHING_PATTERN>",
        "item_id": "00000000-0000-4000-8000-000000000001",
        "quantity": 0,
        "subtotal": "<VALUE_MATCHING_PATTERN>",
        "tax_amount": "<VALUE_MATCHING_PATTERN>",
        "total": "<VALUE_MATCHING_PATTERN>",
        "unit_price": "<VALUE_MATCHING_PATTERN>"
      }
    ],
    "subtotal": "<VALUE_MATCHING_PATTERN>",
    "tax_amount": "<VALUE_MATCHING_PATTERN>",
    "total": "<VALUE_MATCHING_PATTERN>"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataSaleQuoteResponserequired
Show data schema
discount_amountstringrequired

The lines' discounts added up.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

linesQuotedLineResponse[]required

One line per item.

Show lines schema
discount_amountstringrequired

Taken off the line at the till; 0.00 when none.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

item_idstringrequired

The catalog item.

Format: uuid

quantityintegerrequired

Units.

subtotalstringrequired

Quantity times the unit price.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

tax_amountstringrequired

Tax on the line after its discount; 0.00 when untaxed.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

totalstringrequired

Subtotal less the discount, plus tax.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

unit_pricestringrequired

The price of one unit at this facility.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

subtotalstringrequired

The lines' subtotals added up.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

tax_amountstringrequired

The lines' tax added up.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

totalstringrequired

What the sale would charge now. Send it back as expected_total.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll retail operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Quote Retail Sale | Facily Developers