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

# Nest from encoded geometry

> Submit a nesting request from encoded geometry (from our importer or defined as `SimpleGeometry`). Returns a `RequestId`; the result is delivered asynchronously to your `ResultsWebhookUri`.

**Body**

- `Request` — a `GeometryNestingRequest`: the encoded geometry, sheets and settings. See the model in the request-body section below.
- `ResultsWebhookUri` — the URL the completed result is `POST`ed to.
- `AutomaticallyStartNesting` — `true` (default) starts nesting immediately; `false` holds the job for `/v1/nesting/delayedstart` (use with SignalR for live progress).



## OpenAPI

````yaml /openapi.json post /v1/nesting/geometry
openapi: 3.0.0
info:
  title: NestAPI
  version: '1.0'
servers:
  - url: https://api.nestapi.com
    description: Production
security: []
tags:
  - name: account
    description: API key and account management
  - name: admin
  - name: ApiAdmin
  - name: auth
  - name: billing
  - name: fairness
    description: >-
      Per-customer nesting-minutes fairness config, weights and usage (requires
      an Admin API key)
  - name: importer
  - name: nesting
    description: Submit nesting jobs, retrieve results and exports
  - name: plan
  - name: proxy
  - name: public
    description: Health check and public utility endpoints
  - name: subscriptionstatus
paths:
  /v1/nesting/geometry:
    parameters:
      - $ref: '#/components/parameters/Accept'
    post:
      tags:
        - nesting
      summary: Nest from encoded geometry
      description: >-
        Submit a nesting request from encoded geometry (from our importer or
        defined as `SimpleGeometry`). Returns a `RequestId`; the result is
        delivered asynchronously to your `ResultsWebhookUri`.


        **Body**


        - `Request` — a `GeometryNestingRequest`: the encoded geometry, sheets
        and settings. See the model in the request-body section below.

        - `ResultsWebhookUri` — the URL the completed result is `POST`ed to.

        - `AutomaticallyStartNesting` — `true` (default) starts nesting
        immediately; `false` holds the job for `/v1/nesting/delayedstart` (use
        with SignalR for live progress).
      operationId: EncodedGeometryNestingRequest
      parameters:
        - name: Request
          in: query
          schema:
            type: string
        - name: ResultsWebhookUri
          in: query
          schema:
            type: string
        - name: AutomaticallyStartNesting
          in: query
          x-nullable: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncodedGeometryNestingRequest'
      responses:
        '200':
          description: Nesting request accepted. Returns a RequestId for tracking.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNestingResult'
        '400':
          description: Invalid request — check the request body and required fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNestingResult'
        '401':
          description: API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNestingResult'
      deprecated: false
      security:
        - Bearer: []
components:
  parameters:
    Accept:
      name: Accept
      in: header
      description: Accept Header
      required: true
      schema:
        type: string
        enum:
          - application/json
  schemas:
    EncodedGeometryNestingRequest:
      title: EncodedGeometryNestingRequest
      properties:
        Request:
          $ref: '#/components/schemas/GeometryNestingRequest'
        ResultsWebhookUri:
          $ref: '#/components/schemas/Uri'
        AutomaticallyStartNesting:
          type: boolean
          nullable: false
      description: >-
        Submit a nesting request from encoded geometry (from the importer or
        defined as SimpleGeometry). Async: returns a RequestId; the result is
        delivered to your ResultsWebhookUri.
      type: object
    ApiNestingResult:
      title: ApiNestingResult
      properties:
        RequestId:
          type: string
          nullable: false
      description: ApiNestingResult
      type: object
    GeometryNestingRequest:
      title: GeometryNestingRequest
      properties:
        GeometryDefinitionImportSettings:
          $ref: '#/components/schemas/ImportSettings'
        NestSettings:
          $ref: '#/components/schemas/NestSettings'
        RenderSettings:
          $ref: '#/components/schemas/RenderSettings'
        DXFExportSettings:
          $ref: '#/components/schemas/DXFExportSettings'
        CommonCutSettings:
          $ref: '#/components/schemas/CommonCutSettings'
        ReportSourceSettings:
          $ref: '#/components/schemas/ReportSourceRenderingSettings'
        Parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        Sheets:
          type: array
          items:
            $ref: '#/components/schemas/Sheet'
        Assemblies:
          type: array
          items:
            $ref: '#/components/schemas/Assembly_Part_'
        RemnantGenerationSettings:
          $ref: '#/components/schemas/RemnantGenerationSettings'
        PartExportSettings:
          $ref: '#/components/schemas/PartExportSettings'
        Tag:
          type: string
      description: GeometryNestingRequest
      type: object
    Uri:
      title: Uri
      properties: {}
      description: Uri
      type: object
    ImportSettings:
      title: ImportSettings
      properties:
        CutLayers:
          type: array
          items:
            $ref: '#/components/schemas/ImportLayerAssignment'
        AttachLayers:
          type: array
          items:
            $ref: '#/components/schemas/ImportLayerAssignment'
        IgnoreLayers:
          type: array
          items:
            $ref: '#/components/schemas/ImportLayerAssignment'
        UseAllPartsInFile:
          type: boolean
        CollateMultipleBlockInserts:
          type: boolean
        AppendPartNamesToIdentities:
          type: boolean
        UsePartNamesAsIdentityOnMultiPartImport:
          type: boolean
        AutomaticallyAttachUnusedCutAssignedGeometry:
          type: boolean
        LayerNameForAutomaticallyAttachedGeometry:
          type: string
        MeasurementUnitsOfImportGeometry:
          type: string
        FromScale:
          type: number
          format: double
          nullable: false
        ToScale:
          type: number
          format: double
          nullable: false
      description: ImportSettings
      type: object
    NestSettings:
      title: NestSettings
      properties:
        PartSpacing:
          type: number
          format: double
          nullable: false
        ReportIntermediateResults:
          type: boolean
          nullable: false
        MaxRunTimeSeconds:
          type: number
          format: double
          nullable: false
        UtilisationStopTarget:
          type: number
          format: double
        RepeatPreference:
          type: string
        NestingDirection:
          type: string
        NestingAngleDegrees:
          type: number
          format: double
        MaximumCPUCount:
          type: integer
          format: int32
          nullable: false
        NestingOrigin:
          type: string
        AllowEnginePopups:
          type: boolean
          nullable: false
        ExportDiagnosticData:
          type: boolean
          nullable: false
        DiagnosticDataPath:
          type: string
        MaximumDifferentSheetSizes:
          type: integer
          format: int32
          nullable: false
        NestingObjective:
          type: string
        InnerLoopFillPreference:
          type: string
        FillerPartsStrategy:
          type: string
        StrictPartPriorities:
          type: boolean
          nullable: false
      description: NestSettings
      type: object
    RenderSettings:
      title: RenderSettings
      properties:
        RenderFormat:
          type: string
        xDimension:
          type: integer
          format: int32
          nullable: false
        yDimension:
          type: integer
          format: int32
          nullable: false
        BackColorARGB:
          type: string
        OutlineLineColorARGB:
          type: string
        PartFillColorARGB:
          type: string
        AutomaticallyChoosePartFillColor:
          type: boolean
          nullable: false
      description: RenderSettings
      type: object
    DXFExportSettings:
      title: DXFExportSettings
      properties:
        DXFVersion:
          type: string
        ExportFileType:
          type: string
        FilePathWithoutExtension:
          type: string
        ExportFolderPath:
          type: string
        PreferredFileNameInFolderWithoutExtension:
          type: string
        NestOrientationAngleCCW:
          type: number
          format: double
        AddPartLabels:
          type: boolean
        PartLabelHeight:
          type: number
          format: double
        AddNestStatistics:
          type: boolean
        ExportSheetBoundaries:
          type: boolean
        SheetExportSettings:
          type: string
        RemoveCommonEdges:
          type: boolean
        OuterLoopDirection:
          type: string
        InnerLoopDirection:
          type: string
        ExportedGeometryStructure:
          type: string
        ExportPartsAsBlocks:
          type: boolean
        ExportAllPartsOnSingleLayer:
          type: boolean
        AllPartsSingleLayerName:
          type: string
        SheetsLayerName:
          type: string
        AppendSheetDimensionsToFileName:
          type: boolean
        AppendQuantityToFileName:
          type: boolean
        AppendSheetIdentifierToFileName:
          type: boolean
        SplitCirclesIntoArcPairs:
          type: boolean
      description: DXFExportSettings
      type: object
    CommonCutSettings:
      title: CommonCutSettings
      properties:
        CommonCuttingImportance:
          type: string
        CommonCutSafety:
          type: string
        CommonCutLeadinCheck:
          type: string
        CommonCutMode:
          type: string
        MaterialCostPerUnitSqr:
          type: number
          format: double
          nullable: false
        CuttingCostPerUnit:
          type: number
          format: double
          nullable: false
        MinLengthOfCommonCut:
          type: number
          format: double
          nullable: false
        RegardingRatio:
          type: number
          format: double
          nullable: false
        CanIntroduceHolesFromCommonCut:
          type: boolean
          nullable: false
        OnlyPairs:
          type: boolean
          nullable: false
        CommonCutPartsMaximumDimensionX:
          type: number
          format: double
          nullable: false
        CommonCutPartsMaximumDimensionY:
          type: number
          format: double
          nullable: false
        AllowCommonCutOnHoles:
          type: boolean
          nullable: false
        CommonCutGap:
          type: number
          format: double
          nullable: false
      description: CommonCutSettings
      type: object
    ReportSourceRenderingSettings:
      title: ReportSourceRenderingSettings
      properties:
        NestingRenderSettings:
          $ref: '#/components/schemas/RenderSettings'
        RenderPartLabelMode:
          type: string
        PartLabelHeight:
          type: number
          format: double
        PartPreviewRenderSettings:
          $ref: '#/components/schemas/RenderSettings'
      description: ReportSourceRenderingSettings
      type: object
    Part:
      title: Part
      properties:
        Identifier:
          type: string
        GeometryDefinitionType:
          type: string
        Quantity:
          type: integer
          format: int32
          nullable: false
        AllowableRotation:
          type: string
        AllowableTilt:
          type: number
          format: double
          nullable: false
        AllowMirror:
          type: boolean
          nullable: false
        PartSpacingOverride:
          type: number
          format: double
        Priority:
          type: integer
          format: int32
          nullable: false
        EncodedPartJson:
          type: string
        InitialRotationAngleFollowingImportCCW:
          type: number
          format: double
          nullable: false
        CustomRotationStepAngle:
          type: number
          format: double
          nullable: false
        AllowCommonCutIfEnabled:
          type: boolean
          nullable: false
        FillerPartQuantity:
          type: integer
          format: int32
          nullable: false
        NestAsRectangle:
          type: boolean
          nullable: false
        CommonCutMaxBlockSize:
          type: integer
          format: int32
          nullable: false
      description: Part
      type: object
    Sheet:
      title: Sheet
      properties:
        Identifier:
          type: string
        GeometryDefinitionType:
          type: string
        RectangularXDimension:
          type: number
          format: double
        RectangularYDimension:
          type: number
          format: double
        IrregularSheetSpacing:
          type: number
          format: double
        TopSpacing:
          type: number
          format: double
        LeftSpacing:
          type: number
          format: double
        RightSpacing:
          type: number
          format: double
        BottomSpacing:
          type: number
          format: double
        Quantity:
          type: integer
          format: int32
          nullable: false
        Priority:
          type: integer
          format: int32
          nullable: false
        EncodedSheetJson:
          type: string
      description: Sheet
      type: object
    Assembly_Part_:
      title: Assembly`1
      properties:
        Parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        Quantity:
          type: integer
          format: int32
          nullable: false
      description: Assembly<Part>
      type: object
    RemnantGenerationSettings:
      title: RemnantGenerationSettings
      properties:
        MinimumDimensionMM:
          type: number
          format: double
          nullable: false
        MinimumAreaMM2:
          type: number
          format: double
          nullable: false
        GenerateRemnantsOnFinalNestedSheetOnly:
          type: boolean
          nullable: false
        IncludeRemnantsInExportedNests:
          type: boolean
          nullable: false
        ExportFolderPath:
          type: string
        RemnantsLayerName:
          type: string
        AllowRemnantGenerationInsidePartHoles:
          type: boolean
          nullable: false
        RemnantGenerationType:
          type: string
      description: RemnantGenerationSettings
      type: object
    PartExportSettings:
      title: PartExportSettings
      properties:
        AddPartLabel:
          type: boolean
        PartLabelHeight:
          type: number
          format: double
        InnerLoopDirection:
          type: string
        OuterLoopDirection:
          type: string
        DXFVersion:
          type: string
        ExportedGeometryStructure:
          type: string
      description: PartExportSettings
      type: object
    ImportLayerAssignment:
      title: ImportLayerAssignment
      properties:
        ColourHex:
          type: string
        LayerName:
          type: string
        LineType:
          type: string
      description: ImportLayerAssignment
      type: object
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````