Skip to main content
GET
/
v1
/
sales
/
{id}
Get a sale
curl --request GET \
  --url https://dev.flextell.ai/api/v1/sales/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Tenant: <x-tenant>'
{
  "success": "<string>",
  "data": {
    "id": 123,
    "tenant_id": 123,
    "user_id": 123,
    "customer_id": 123,
    "appointment_id": 123,
    "currency_id": 123,
    "exchange_rate": 123,
    "notes": "<string>",
    "status": "<string>",
    "total_price": 123,
    "remaining_balance": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "customer": {
      "id": 123,
      "first_name": "<string>",
      "last_name": "<string>",
      "phone_number": "<string>",
      "email": "<string>"
    },
    "user": {
      "id": 123,
      "name": "<string>"
    },
    "currency": {
      "id": 123,
      "code": "<string>",
      "symbol": "<string>",
      "name": "<string>"
    },
    "items": [
      {
        "id": 123,
        "sale_id": 123,
        "staff_id": 123,
        "order": 123,
        "itemable_type": "<string>",
        "itemable_id": 123,
        "warehouse_id": 123,
        "quantity": 123,
        "tax_rate": 123,
        "unit_price": 123,
        "cost_price": 123,
        "discount_amount": 123,
        "discount_percentage": 123,
        "sub_total": 123,
        "total_discount": 123,
        "total_tax": 123,
        "total_price": 123,
        "staff": {
          "id": 123,
          "name": "<string>"
        },
        "itemable": {
          "id": "<string>",
          "name": "<string>"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Path Parameters

id
integer
required

The sale identifier

Response

success
string
required
data
SaleResource · object
required