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

# Create Fraud Report

> Attach a fraud report to a return.

### Required API key scope
- Returns




## OpenAPI

````yaml post /returns/{id}/fraud-report
openapi: 3.1.0
info:
  title: Fraud Reports API
  version: v1
  description: API used for creating and retrieving fraud reports.
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Return Actions
paths:
  /returns/{id}/fraud-report:
    post:
      tags:
        - Return Actions
      summary: Create Fraud Report
      description: |
        Attach a fraud report to a return.

        ### Required API key scope
        - Returns
      operationId: createFraudReport
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: The return's unique identifier.
          example: 23141
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReturnFraudReportRequest'
      responses:
        '201':
          $ref: '#/components/responses/CreateFraudReport'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
      security:
        - api_key: []
components:
  schemas:
    CreateReturnFraudReportRequest:
      type: object
      properties:
        category:
          type:
            - string
            - 'null'
          enum:
            - package-never-received
            - package-is-empty
            - package-is-missing-items
            - instant-return-charge-failed
            - keep-item-abuse
            - splitting-returns-to-avoid-restrictions
            - item-is-worn
            - other
            - null
          description: The category under which the fraudulent return falls.
        comment:
          type:
            - string
            - 'null'
          maxLength: 512
          description: Any additional context associated with the fraudulent return.
          example: This is a sample comment.
    ReturnFraudReport:
      type: object
      required:
        - id
        - return_id
        - category
        - created_at
      properties:
        category:
          type: string
          enum:
            - package-never-received
            - package-is-empty
            - package-is-missing-items
            - instant-return-charge-failed
            - keep-item-abuse
            - splitting-returns-to-avoid-restrictions
            - item-is-worn
            - other
          description: The category under which the fraudulent return falls.
        comment:
          type:
            - string
            - 'null'
          description: >
            Any additional context associated with the fraudulent return. This
            property is required if the `category` is set to `other`.
          example: This is a sample comment.
        created_at:
          type: string
          format: date-time
          description: The date and time at which the fraud report was created.
          example: '2024-10-25T16:44:47.038Z'
        return_id:
          type: integer
          example: 23141
          description: The return's unique identifier.
        id:
          type: integer
          example: 87
          description: The fraud report's unique identifier.
    InvalidCategory:
      type: object
      properties:
        message:
          type: string
          example: >-
            Must be one of the following values: package-never-received,
            package-is-empty, package-is-missing-items,
            instant-return-charge-failed, keep-item-abuse,
            splitting-returns-to-avoid-restrictions, item-is-worn, other
        errors:
          type: object
    InvalidComment:
      type: object
      properties:
        message:
          type: string
          example: The comment field must not be greater than 512 characters.
        errors:
          type: object
  responses:
    CreateFraudReport:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ReturnFraudReport'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                example: Unauthorized.
    NotFound:
      description: Resource Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                properties:
                  message:
                    type: string
                    example: No return found with this ID.
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                properties:
                  message:
                    type: string
                    example: Fraud report already exists.
    Unprocessable:
      description: Unprocessable
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/InvalidCategory'
              - $ref: '#/components/schemas/InvalidComment'
  securitySchemes:
    api_key:
      type: apiKey
      name: X-Authorization
      in: header

````