# Sections

The section represents the area where the dine in tables exist.

# The Section Object

# Sample

{
    "id": "8cd1956b",
    "name": "Adams PLC",
    "name_localized": null,
    "branch": {
      "id": "8d82ff0c"
    },
    "tables": [
      {
        "id": "8d889f45"
      }
    ],
    "created_at": "2019-02-24 11:43:28",
    "updated_at": "2019-02-24 11:43:28",
    "deleted_at": null
  }

# Attributes

Field Type Rule Description
id string Unique identifier for the section.
name string updatable Name of the section.
name_localized string nullable updatable Localized name of the section.
branch object updatable includable The Branch object attached to the section.
tables array nullable updatable includable List of Table objects attached to the section.
created_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created.
updated_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated.
deleted_at string nullable Time YYYY-MM-DD HH-MM-SS in UTC at which the object was delete.

# List Sections

GET /sections

# Scope

general.read

# Filters

  • id
  • name
  • created_on
  • updated_on
  • deleted_on
  • name_localized
  • branch_id
  • tables.id
  • updated_after
  • is_deleted

# Response

{
    "data": [
        {
            "id": "8cd1956b",
            "name": "Adams PLC",
            "name_localized": null,
            "created_at": "2019-02-24 11:43:28",
            "updated_at": "2019-02-24 11:43:28",
            "deleted_at": null
        }
    ]
}

# Get Section

GET /sections/{sectionId}

# Scope

general.read

# Response

{
  "data": {
    "id": "8cd1956b",
    "name": "Adams PLC",
    "name_localized": null,
    "branch": {
      "id": "8d82ff0c"
    },
    "tables": [
      {
        "id": "8d889f45"
      }
    ],
    "created_at": "2019-02-24 11:43:28",
    "updated_at": "2019-02-24 11:43:28",
    "deleted_at": null
  }
}

# Create Section

POST /sections

# Scope

tables.write

# Request

{
    "name": "Adams PLC",
    "name_localized": null,
    "branch_id": "8cd1956b"
}

# Response

{
  "data": {
    "id": "8cd1956b",
    "name": "Adams PLC",
    "name_localized": null,
    "branch": {
      "id": "8d82ff0c"
    },
    "tables": [
      {
        "id": "8d889f45"
      }
    ],
    "created_at": "2019-02-24 11:43:28",
    "updated_at": "2019-02-24 11:43:28",
    "deleted_at": null
  }
}

# Update Section

PUT /sections/{sectionId}

# Scope

tables.write

# Request

{
    "name": "Adams PLC",
    "name_localized": null,
    "branch_id": "8cd1956b"
}

# Response

{
  "data": {
    "id": "8cd1956b",
    "name": "Adams PLC",
    "name_localized": null,
    "branch": {
      "id": "8d82ff0c"
    },
    "tables": [
      {
        "id": "8d889f45"
      }
    ],
    "created_at": "2019-02-24 11:43:28",
    "updated_at": "2019-02-24 11:43:28",
    "deleted_at": null
  }
}

# Delete Section

DELETE /sections/{sectionId}

# Scope

tables.write

# Restore Section

PUT /sections/{sectionId}/restore

# Scope

admin.restore

Last Updated: 22/9/2023, 9:30:51 AM