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

# Create a sales quote

> Create a new record with optional child records.



## OpenAPI

````yaml /api-reference/openapi.json post /order/sales_quote/
openapi: 3.0.3
info:
  title: Fail Fast API
  version: v1
  description: >-
    REST API for the Fail Fast platform. Authenticate with a workspace API key
    sent as a bearer token. Every response uses the `{message, error, data}`
    envelope.
servers:
  - url: https://api.failfast.ai
security: []
paths:
  /order/sales_quote/:
    post:
      tags:
        - Sales
      summary: Create a sales quote
      description: Create a new record with optional child records.
      operationId: order_sales_quote_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesQuote'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SalesQuote'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SalesQuote'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - error
                  - data
                properties:
                  message:
                    type: string
                    description: Human-readable outcome of the request.
                  error:
                    type: boolean
                    description: true when the request failed.
                    example: false
                  data:
                    $ref: '#/components/schemas/SalesQuote'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    SalesQuote:
      type: object
      description: |-
        A ModelSerializer that takes an additional `fields` argument that
        controls which fields should be displayed.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        custom_fields:
          nullable: true
        operation_number:
          type: integer
          maximum: 2147483647
          minimum: 0
          default: 0
        operation_date:
          type: string
          format: date-time
        description:
          type: string
          nullable: true
        operation_status:
          $ref: '#/components/schemas/OperationStatusEnum'
        status_description:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        audit_status:
          allOf:
            - $ref: '#/components/schemas/AuditStatusEnum'
          readOnly: true
        validation_date:
          type: string
          format: date-time
        discount_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        quote_number_customer:
          type: string
        subtotal:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        discount_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        additional_discount_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        insurance_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        freight_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        total:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        operation_state:
          $ref: '#/components/schemas/OperationStateEnum'
        member:
          type: string
          format: uuid
          readOnly: true
        operation:
          type: string
          format: uuid
        market_exchange_rate:
          type: string
          format: uuid
          nullable: true
        branch_office:
          type: string
          format: uuid
        created_by:
          type: string
          format: uuid
          readOnly: true
        updated_by:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        deleted_by:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        customer:
          type: string
          format: uuid
        customer_detail:
          type: string
          format: uuid
          nullable: true
        location:
          type: string
          format: uuid
          nullable: true
        salesman:
          type: string
          format: uuid
        commercial_condition:
          type: string
          format: uuid
        discount_type:
          type: string
          format: uuid
          nullable: true
        price_list_type:
          type: string
          format: uuid
      required:
        - audit_status
        - branch_office
        - commercial_condition
        - created_at
        - created_by
        - customer
        - deleted_at
        - deleted_by
        - id
        - member
        - name
        - operation
        - operation_date
        - price_list_type
        - quote_number_customer
        - salesman
        - updated_at
        - updated_by
        - validation_date
    OperationStatusEnum:
      enum:
        - PR
        - CO
        - ER
      type: string
      description: |-
        * `PR` - Provisional
        * `CO` - Complete
        * `ER` - Error
    AuditStatusEnum:
      enum:
        - C
        - U
        - D
      type: string
      description: |-
        * `C` - Created
        * `U` - Updated
        * `D` - Deleted
    OperationStateEnum:
      enum:
        - DRA
        - SEN
        - ACC
        - REJ
        - EXP
        - CON
      type: string
      description: |-
        * `DRA` - DRAFT
        * `SEN` - SENT
        * `ACC` - ACCEPTED
        * `REJ` - REJECTED
        * `EXP` - EXPIRED
        * `CON` - CONVERTED
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key sent as a bearer token: `Authorization: Bearer
        failfast_...`. Create keys in Settings -> Workspace -> API Keys.

````