> ## 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.

# Update Label Status

> Update the status of the label.

#### Required API key scope
- Labels (Write)




## OpenAPI

````yaml put /labels/{id}
openapi: 3.1.0
info:
  title: Labels API
  description: API for managing label requests
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Label Requests
paths:
  /labels/{id}:
    put:
      tags:
        - Label Requests
      summary: Update Label Status
      description: |
        Update the status of the label.

        #### Required API key scope
        - Labels (Write)
      operationId: update-label-status
      parameters:
        - in: path
          name: id
          schema:
            type: integer
            example: 67329889100573
          required: true
          description: >
            The unique identifier for the label, created by Loop. This is the
            identifier that is

            returned from the Create Label request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLabelStatusRequest'
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The label could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelOperationError'
              example:
                errors: Label not found.
        '422':
          $ref: '#/components/responses/Unprocessable'
        '500':
          description: An unexpected error occurred while updating the label.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelOperationError'
              example:
                errors: Error updating label.
      security:
        - oauth2:
            - labels:write
        - labels-write: []
components:
  schemas:
    UpdateLabelStatusRequest:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/LabelStatusEnum'
      required:
        - status
    LabelOperationError:
      type: object
      description: >
        Error envelope returned by the label create and update operations.
        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.
    LabelStatusEnum:
      type: string
      description: The label status values accepted when updating a label.
      enum:
        - new
        - pre_transit
        - in_transit
        - out_for_delivery
        - delivered
      example: new
  responses:
    Unauthorized:
      description: The request could not be authorized.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    example: '401'
                  http_code:
                    type: string
                    example: GEN-UNAUTHORIZED
                  message:
                    type: string
                    example: Unauthorized.
    Forbidden:
      description: >
        The authenticated shop is not authorized to act on this resource (for
        example, the label's

        return belongs to a different shop).
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: This action is 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
    labels-write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Labels (write)"'
      x-scope: Labels (Write)

````