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

# Add an order note

> Adds a note to an order in the authenticated organization. Safe retries require Idempotency-Key.

Scope notes: Requires order write scope and authenticated organization isolation.

Mutation safety: Send an Idempotency-Key header for safe retries.



## OpenAPI

````yaml /public_openapi_v1.json post /orders/{id}/notes
openapi: 3.0.0
info:
  title: Sellfern Public API
  version: 1.0.0
  description: OpenAPI spec for Sellfern Public V1 developer docs.
  contact:
    name: Sellfern Support
    email: support@sellfern.com
servers:
  - url: https://api.sellfern.com
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Organizations And Stores
  - name: Orders
  - name: Order Items
  - name: Products And Catalog
  - name: Webhooks
paths:
  /orders/{id}/notes:
    post:
      tags:
        - Orders
      summary: Add an order note
      description: >-
        Adds a note to an order in the authenticated organization. Safe retries
        require Idempotency-Key.


        Scope notes: Requires order write scope and authenticated organization
        isolation.


        Mutation safety: Send an Idempotency-Key header for safe retries.
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
          description: >-
            Required for public write retries. Reuse the same key for safe retry
            after network or 5xx uncertainty. Reusing a key with a different
            request returns 422 idempotency_conflict.
        - name: id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: Order ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
      responses:
        '201':
          description: Mutation completed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/PublicOrderNote'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PublicOrderNote:
      type: object
      properties:
        id:
          type: integer
          example: 42
        order_id:
          type: integer
          example: 1234567890
        author_user_id:
          type: integer
          nullable: true
          description: Internal user ID when the note was created by a user.
        author_token_id:
          type: integer
          nullable: true
          description: API token ID when the note was created by an integration.
        author_name:
          type: string
          nullable: true
          example: Operations Bot
        text:
          type: string
          example: Supplier confirmed production start.
        created_at:
          type: string
          format: date-time
          nullable: true
    ResponseMeta:
      type: object
      properties:
        request_id:
          type: string
          description: Request identifier, when available.
  responses:
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - error
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    example: validation_error
                  message:
                    type: string
                    example: Request validation failed.
              meta:
                $ref: '#/components/schemas/ResponseMeta'
    UnauthorizedError:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - error
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    example: unauthorized
                  message:
                    type: string
                    example: Missing or invalid API key.
              meta:
                $ref: '#/components/schemas/ResponseMeta'
    ForbiddenError:
      description: API key lacks the required scope.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - error
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    example: missing_scope
                  message:
                    type: string
                    example: Missing required scope.
              meta:
                $ref: '#/components/schemas/ResponseMeta'
    NotFoundError:
      description: Resource not found or outside the authenticated organization.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - error
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    example: not_found
                  message:
                    type: string
                    example: Resource not found.
              meta:
                $ref: '#/components/schemas/ResponseMeta'
    RateLimitedError:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - error
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    example: rate_limited
                  message:
                    type: string
                    example: Rate limit exceeded.
              meta:
                $ref: '#/components/schemas/ResponseMeta'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Sellfern public API key scoped to the authenticated organization. Do not
        use user JWTs for public integrations.

````