> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getspecs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch areas, area links and area layers for a project



## OpenAPI

````yaml /openapi.yaml get /projects/{project_id}/areas/init
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /projects/{project_id}/areas/init:
    get:
      tags:
        - Area
      summary: Fetch areas, area links and area layers for a project
      operationId: areas#init
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/area_index'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    area_index:
      type: object
      properties:
        areas:
          type: array
          items:
            $ref: '#/components/schemas/area'
        area_links:
          type: array
          items:
            $ref: '#/components/schemas/area_link'
        area_layers:
          type: array
          items:
            $ref: '#/components/schemas/area_layer'
      required:
        - areas
        - area_links
        - area_layers
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
    area:
      type: object
      properties:
        id:
          type: integer
        project_id:
          type: integer
        layer_id:
          type: integer
          nullable: true
        name:
          type: string
        slug:
          type: string
        total_quantity:
          type: string
        reserved:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
    area_link:
      type: object
      properties:
        id:
          type: integer
        project_id:
          type: integer
        parent_id:
          type: integer
        child_id:
          type: integer
        quantity:
          type: string
    area_layer:
      type: object
      properties:
        id:
          type: integer
        project_id:
          type: integer
        name:
          type: string
        position:
          type: integer
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.