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

# Create a new Log



## OpenAPI

````yaml Commerce post /logs
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /logs:
    parameters:
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    post:
      summary: Create a new Log
      operationId: post-log
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewLog'
      responses:
        '200':
          description: Log Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Log'
                  success:
                    type: boolean
        '400':
          description: Missing Required Information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 400
                      message: Missing Required Information
                    success: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    NewLog:
      $id: NewLog
      title: Log
      properties:
        id:
          type: string
          description: Log is uniquely identified by id
        title:
          type: string
          description: Log has Title
        trace:
          type: string
          description: Log has Trace
        requestBody:
          type: object
          description: Log has Request Body
        path:
          type: string
          description: Log has Path
        method:
          type: string
          description: Log has Method
        ipAddress:
          type: string
          description: Log has IP Address
        userAgent:
          type: string
          description: Log has User Agent
        status:
          type: string
          description: Log has Status
        responseBody:
          type: object
          description: Log has Response Body
        responseHeaders:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
              - $ref: '#/components/schemas/Header'
          description: Log has Response Header
        requestHeaders:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
              - $ref: '#/components/schemas/Header'
          description: Log has Request Header
      type: object
    Log:
      $id: Log
      required:
        - id
      title: Log
      type: object
      properties:
        id:
          type: string
          description: Log is uniquely identified by id
        title:
          type: string
          description: Log has Title
        trace:
          type: string
          description: Log has Trace
        requestBody:
          type: object
          description: Log has Request Body
        path:
          type: string
          description: Log has Path
        method:
          type: string
          description: Log has Method
        ipAddress:
          type: string
          description: Log has IP Address
        userAgent:
          type: string
          description: Log has User Agent
        status:
          type: string
          description: Log has Status
        responseBody:
          type: object
          description: Log has Response Body
        responseHeaders:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
              - $ref: '#/components/schemas/Header'
          description: Log has Response Header
        requestHeaders:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  key:
                    type: string
                  value:
                    type: string
                required:
                  - key
                  - value
              - $ref: '#/components/schemas/Header'
          description: Log has Request Header
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean
    Header:
      $id: Header
      title: Header
      properties:
        key:
          type: string
          description: Header is uniquely identified by Key
        value:
          type: string
          description: Header is uniquely identified by Value
      type: object
      required:
        - key
        - value

````