📡Disposition API: Update LRT data

Using Excel file with disposition table

API Specification for Uploading XLS File for Laminate Repair Tool (LRT) Data:

  • Endpoint: /api/files/lrt-data

  • Method: POST

  • Description: This endpoint accepts an XLS file upload, which is then processed and made available for dispositions requests related to the Laminate Repair Tool (LRT).

  • Request:

    • Headers:

      • Content-Type: multipart/form-data (required for file upload)

    • Body:

      • A form-data field that contains the XLS file to be uploaded. The field should be named appropriately (e.g., file).

  • Response:

    • Success Response Code: 200 OK / 201 Created

    • Content:

      {
        "message": "File uploaded successfully",
        "fileId": "String (Unique identifier for the uploaded file)"
      }
    • Error Response:

      • Response Code: 400 Bad Request

      • Content: { "error": "Invalid file format. Only XLS files are accepted." }

      • Response Code: 413 Payload Too Large

      • Content: { "error": "The uploaded file exceeds the maximum allowed size." }

      • Response Code: 500 Internal Server Error

      • Content: { "error": "Could not process the file. Please try again later." }

  • Notes:

    • The file uploaded to this endpoint is expected to be in XLS format, which is a file format used by Microsoft Excel up to version 2003. If XLSX (Excel 2007 and later) files need to be supported, that should be specified in the endpoint documentation.

    • The uploaded file is processed to extract relevant data for laminate repair dispositions. It's essential to ensure that the file adheres to the expected format and data schema to be compatible with the system's processing logic.

    • Upon successful upload, the system will return a unique file identifier (fileId) which can be used in subsequent API calls to refer to this specific data set.

    • Implementers should handle the uploaded file securely and ensure that appropriate error handling is in place for various failure scenarios, such as invalid file format, server issues, or file size limitations.

Last updated