# Cancel a loading

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /loadings/{id}:
    delete:
      summary: Cancel a loading
      deprecated: false
      description: Cancels an existing loading. Cannot cancel already cancelled loadings.
      operationId: cancelLoading
      tags:
        - LoadingCalendar API/Loadings
        - Loadings
      parameters:
        - name: id
          in: path
          description: Loading ID
          required: true
          example: 0
          schema:
            type: integer
      responses:
        '200':
          description: Loading cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - Loading cancelled successfully
                x-apidog-orders:
                  - message
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - Invalid API key
          headers: {}
          x-apidog-name: Unauthorized
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      examples:
                        - Not found
                    examples:
                      - - Not found
                x-apidog-refs: {}
                x-apidog-orders:
                  - errors
                x-apidog-ignore-properties: []
              example:
                errors:
                  - Not found
          headers: {}
          x-apidog-name: NotFound
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                      examples:
                        - Validation failed
                    examples:
                      - - Validation failed
                x-apidog-refs: {}
                x-apidog-orders:
                  - errors
                x-apidog-ignore-properties: []
              example:
                errors:
                  - Validation failed
          headers: {}
          x-apidog-name: UnprocessableEntity
      security: []
      x-apidog-folder: LoadingCalendar API/Loadings
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/361044/apis/api-4047028-run
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          examples:
            - - Access forbidden
      x-apidog-orders:
        - errors
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      description: API key obtained from the Developers section
servers:
  - url: https://loadingcalendar-staging.herokuapp.com/api/v1
    description: Testing Env
  - url: https://www.loadingcalendar.com/api/v1
    description: Prod Env
security: []

```