> ## 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 Label Request Error

> Report a label generation failure against a label request.

The error is recorded against the label request and surfaced to the merchant on the
return's timeline in Loop admin. Reporting an error does **not** change the label
request's `status`, trigger a retry, issue a new label request, send a webhook, or
notify the shopper — the request remains `issued`.

A label request that has reported one or more errors can still be fulfilled
afterwards by calling `POST /labels` with the same `id`. This is the recommended way
to recover from a transient failure.

Reporting an error against a label request that is already `fulfilled` or `cancelled`
returns `404 Label request not found.` That response does not necessarily mean the
`id` is unknown — it can also mean the request is no longer open.

#### Required API key scope
- Label Requests (Write)




## OpenAPI

````yaml post /label-requests/{id}/errors
openapi: 3.1.0
info:
  title: Labels API
  description: API for managing label requests
  version: v1
servers:
  - url: https://api.loopreturns.com/api/2026-10
    description: 2026-10 (Stable)
  - url: https://api.loopreturns.com/api/2026-07
    description: 2026-07
  - url: https://api.loopreturns.com/api/unstable
    description: Unstable (Preview)
security: []
tags:
  - name: Label Requests
paths:
  /label-requests/{id}/errors:
    post:
      tags:
        - Label Requests
      summary: Create Label Request Error
      description: >
        Report a label generation failure against a label request.


        The error is recorded against the label request and surfaced to the
        merchant on the

        return's timeline in Loop admin. Reporting an error does **not** change
        the label

        request's `status`, trigger a retry, issue a new label request, send a
        webhook, or

        notify the shopper — the request remains `issued`.


        A label request that has reported one or more errors can still be
        fulfilled

        afterwards by calling `POST /labels` with the same `id`. This is the
        recommended way

        to recover from a transient failure.


        Reporting an error against a label request that is already `fulfilled`
        or `cancelled`

        returns `404 Label request not found.` That response does not
        necessarily mean the

        `id` is unknown — it can also mean the request is no longer open.


        #### Required API key scope

        - Label Requests (Write)
      operationId: create-label-request-error
      parameters:
        - in: path
          name: id
          schema:
            type: integer
            example: 67329889100573
          required: true
          description: The unique identifier for the label request, created by Loop.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLabelRequestErrorRequest'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelRequestErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >
            The label request could not be found, or is no longer open — this
            response is

            also returned when the label request is already `fulfilled` or
            `cancelled`, so

            receiving it does not prove the `id` itself is unknown.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelOperationError'
              example:
                errors: Label request not found.
        '422':
          $ref: '#/components/responses/Unprocessable'
        '500':
          description: >-
            An unexpected error occurred while recording the label request
            error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelOperationError'
              example:
                errors: Error recording label request error.
      security:
        - oauth2:
            - label_requests:write
        - label-requests-write: []
components:
  schemas:
    CreateLabelRequestErrorRequest:
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/ErrorReasonEnum'
          description: The reason code associated with the label request error.
        message:
          type:
            - string
            - 'null'
          maxLength: 500
          description: The message associated with the label request error.
          example: Failed to generate a label, the origin address is invalid
      required:
        - reason
    LabelRequestErrorResponse:
      type: object
      required:
        - reason
      properties:
        reason:
          $ref: '#/components/schemas/ErrorReasonEnum'
          description: The reason code associated with the label request error.
        message:
          type:
            - string
            - 'null'
          description: The message associated with the label request error.
          example: Failed to generate a label, the origin address is invalid
        created_at:
          $ref: '#/components/schemas/Date'
    LabelOperationError:
      type: object
      description: >
        Error envelope for a label or label-request failure response. Unlike the
        generic

        error responses, `errors` is a single message string rather than an
        object or array.
      required:
        - errors
      properties:
        errors:
          type: string
          example: Label not found.
    ErrorReasonEnum:
      type: string
      description: The error reason.
      enum:
        - INSUFFICIENT_FUNDS
        - INVALID_ADDRESS
        - Other
      example: INVALID_ADDRESS
    Date:
      type: string
      description: >
        A date-time value in ISO 8601 format. What it represents (for example,
        when a label,

        label request, or reported error was created, or a date-range filter
        bound) depends on

        the field or parameter referencing this schema.
      format: date-time
      example: '2023-04-25T13:25:00-05:00'
  responses:
    Unauthorized:
      description: The request could not be authorized.
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                example: Unauthorized.
    Unprocessable:
      description: >
        Validation failed. Returned when the request body does not satisfy the
        endpoint's

        validation rules.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: The status field is required.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  status:
                    - The status field is required.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.loopreturns.com/authorize
          tokenUrl: https://oauth.loopreturns.com/oauth/token
          scopes:
            labels:read: Read access to labels
            labels:write: Create and modify labels
            label_requests:read: Read access to label requests
            label_requests:write: Create and modify label requests
            returns: Access to returns operations
    label-requests-write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Label Requests (write)"'
      x-scope: Label Requests (Write)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.