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

Void Retail Sale

Retail · REST API reference

Get support
POST/v1/retail-sales/{sale_id}/void
Void a sale: its charges are voided and its stock put back. A tenant sale also needs ledger.void. A walk-in sale also needs payment.refund: its payment is refunded in full, inline for a recorded tender, or to the card at the processor (202 with the sale void_pending while the refund is unanswered; a failed refund leaves it completed).

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/retail-sales/<SALE_ID>/void' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "reason": "string"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

sale_idpath · stringrequired

Format: uuid

Request body

application/json · Required

reasonstringrequired

Why the sale is voided.

Min length: 1 · Max length: 200

Responses

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

200Successful Response
JSON · generated example
{
  "data": {
    "can_void": false,
    "created_at": "2026-10-29T12:00:00Z",
    "discount_amount": "<VALUE_MATCHING_PATTERN>",
    "facility_id": "00000000-0000-4000-8000-000000000001",
    "id": "00000000-0000-4000-8000-000000000001",
    "lines": [
      {
        "discount_amount": "<VALUE_MATCHING_PATTERN>",
        "item_id": "00000000-0000-4000-8000-000000000001",
        "name": "string",
        "quantity": 0,
        "sku": "string",
        "subtotal": "<VALUE_MATCHING_PATTERN>",
        "tax_amount": "<VALUE_MATCHING_PATTERN>",
        "total": "<VALUE_MATCHING_PATTERN>",
        "unit_price": "<VALUE_MATCHING_PATTERN>"
      }
    ],
    "payer_kind": "string",
    "payment_id": "00000000-0000-4000-8000-000000000001",
    "sold_on": "2026-10-29",
    "staff_name": "string",
    "status": "string",
    "subtotal": "<VALUE_MATCHING_PATTERN>",
    "tax_amount": "<VALUE_MATCHING_PATTERN>",
    "tenant": {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "string"
    },
    "tender": {
      "last_four": "string",
      "method": "string",
      "reference": "string"
    },
    "total": "<VALUE_MATCHING_PATTERN>",
    "unit_numbers": [
      "string"
    ],
    "void_blocked_reason": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataSaleResponserequired
Show data schema
can_voidbooleanrequired

Whether this caller can void the sale now: holds the permissions for its payer kind, the sale is completed, and the facility's void window is open.

created_atstringrequired

When the sale was made.

Format: date-time

discount_amountstringrequired

The lines' discounts added up.

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

facility_idstringrequired

The facility that made the sale.

Format: uuid

idstringrequired

Unique identifier for this sale.

Format: uuid

linesSaleListLineResponse[]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

namestringrequired

The item's name.

quantityintegerrequired

Units sold.

skustringrequired

The item's SKU.

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 when sold.

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

payer_kindstringrequired

tenant or walk_in.

payment_idstring | nullrequired

The walk-in's payment.

Format: uuid

Show payment_id schema
string | null

The walk-in's payment.

Variant 1: string
string
Variant 2: null
null
sold_onstringrequired

The facility's business date of the sale.

Format: date

staff_namestring | nullrequired

Who made the sale.

Show staff_name schema
string | null

Who made the sale.

Variant 1: string
string
Variant 2: null
null
statusstringrequired

completed, void_pending or voided.

subtotalstringrequired

The lines' subtotals added up.

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

tax_amountstringrequired

The lines' tax added up.

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

tenantSaleTenantResponse | nullrequired

The tenant, for a tenant sale; null for a walk-in.

Show tenant schema
SaleTenantResponse | null

The tenant, for a tenant sale; null for a walk-in.

Variant 1: SaleTenantResponse
idstringrequired

The tenant.

Format: uuid

namestringrequired

The tenant's name as staff see it.

Variant 2: null
null
tenderSaleTenderResponse | nullrequired

How a walk-in paid; null for a tenant sale.

Show tender schema
SaleTenderResponse | null

How a walk-in paid; null for a tenant sale.

Variant 1: SaleTenderResponse
last_fourstring | nullrequired

A card's last four digits, when the sale kept the card.

Show last_four schema
string | null

A card's last four digits, when the sale kept the card.

Variant 1: string
Variant 2: null
methodstringrequired

cash, check, money_order or card.

referencestring | nullrequired

A check or money order number, or a card's outside reference.

Show reference schema
string | null

A check or money order number, or a card's outside reference.

Variant 1: string
Variant 2: null
Variant 2: null
null
totalstringrequired

What the sale charged.

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

unit_numbersstring[]required

The tenant's unit, for a tenant sale; empty for a walk-in.

Show unit_numbers schema
string
void_blocked_reasonstring | nullrequired

Why a completed sale cannot be voided: void_window_closed or lease_not_active; else null.

Show void_blocked_reason schema
string | null

Why a completed sale cannot be voided: void_window_closed or lease_not_active; else null.

Variant 1: string
string
Variant 2: null
null
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
202The card is at the processor: the sale is pending (or void_pending) until it decides
JSON · generated example
{
  "data": {
    "can_void": false,
    "created_at": "2026-10-29T12:00:00Z",
    "discount_amount": "<VALUE_MATCHING_PATTERN>",
    "facility_id": "00000000-0000-4000-8000-000000000001",
    "id": "00000000-0000-4000-8000-000000000001",
    "lines": [
      {
        "discount_amount": "<VALUE_MATCHING_PATTERN>",
        "item_id": "00000000-0000-4000-8000-000000000001",
        "name": "string",
        "quantity": 0,
        "sku": "string",
        "subtotal": "<VALUE_MATCHING_PATTERN>",
        "tax_amount": "<VALUE_MATCHING_PATTERN>",
        "total": "<VALUE_MATCHING_PATTERN>",
        "unit_price": "<VALUE_MATCHING_PATTERN>"
      }
    ],
    "payer_kind": "string",
    "payment_id": "00000000-0000-4000-8000-000000000001",
    "sold_on": "2026-10-29",
    "staff_name": "string",
    "status": "string",
    "subtotal": "<VALUE_MATCHING_PATTERN>",
    "tax_amount": "<VALUE_MATCHING_PATTERN>",
    "tenant": {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "string"
    },
    "tender": {
      "last_four": "string",
      "method": "string",
      "reference": "string"
    },
    "total": "<VALUE_MATCHING_PATTERN>",
    "unit_numbers": [
      "string"
    ],
    "void_blocked_reason": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataSaleResponserequired
Show data schema
can_voidbooleanrequired

Whether this caller can void the sale now: holds the permissions for its payer kind, the sale is completed, and the facility's void window is open.

created_atstringrequired

When the sale was made.

Format: date-time

discount_amountstringrequired

The lines' discounts added up.

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

facility_idstringrequired

The facility that made the sale.

Format: uuid

idstringrequired

Unique identifier for this sale.

Format: uuid

linesSaleListLineResponse[]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

namestringrequired

The item's name.

quantityintegerrequired

Units sold.

skustringrequired

The item's SKU.

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 when sold.

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

payer_kindstringrequired

tenant or walk_in.

payment_idstring | nullrequired

The walk-in's payment.

Format: uuid

Show payment_id schema
string | null

The walk-in's payment.

Variant 1: string
string
Variant 2: null
null
sold_onstringrequired

The facility's business date of the sale.

Format: date

staff_namestring | nullrequired

Who made the sale.

Show staff_name schema
string | null

Who made the sale.

Variant 1: string
string
Variant 2: null
null
statusstringrequired

completed, void_pending or voided.

subtotalstringrequired

The lines' subtotals added up.

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

tax_amountstringrequired

The lines' tax added up.

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

tenantSaleTenantResponse | nullrequired

The tenant, for a tenant sale; null for a walk-in.

Show tenant schema
SaleTenantResponse | null

The tenant, for a tenant sale; null for a walk-in.

Variant 1: SaleTenantResponse
idstringrequired

The tenant.

Format: uuid

namestringrequired

The tenant's name as staff see it.

Variant 2: null
null
tenderSaleTenderResponse | nullrequired

How a walk-in paid; null for a tenant sale.

Show tender schema
SaleTenderResponse | null

How a walk-in paid; null for a tenant sale.

Variant 1: SaleTenderResponse
last_fourstring | nullrequired

A card's last four digits, when the sale kept the card.

Show last_four schema
string | null

A card's last four digits, when the sale kept the card.

Variant 1: string
Variant 2: null
methodstringrequired

cash, check, money_order or card.

referencestring | nullrequired

A check or money order number, or a card's outside reference.

Show reference schema
string | null

A check or money order number, or a card's outside reference.

Variant 1: string
Variant 2: null
Variant 2: null
null
totalstringrequired

What the sale charged.

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

unit_numbersstring[]required

The tenant's unit, for a tenant sale; empty for a walk-in.

Show unit_numbers schema
string
void_blocked_reasonstring | nullrequired

Why a completed sale cannot be voided: void_window_closed or lease_not_active; else null.

Show void_blocked_reason schema
string | null

Why a completed sale cannot be voided: void_window_closed or lease_not_active; else null.

Variant 1: string
string
Variant 2: null
null
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

Void Retail Sale | Facily Developers