# Create file

This method allows to create a file upload request by generating a unique file_id to reference the file. 

This file can be used for various purposes such as evidence for dispute representment, compliance checks, or other necessary documentation uploads.

Endpoint: POST /file/get-upload-url
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "api_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

## Request fields (application/json):

  - `file_name` (string, required)
    Name of the file, including its extension.


  Should be provided one of extensions jpg, jpeg, png, gif, txt, pdf, doc, docx, rtf, xls, xlsx.
    Example: "document.pdf"

  - `file_type` (string, required)
    Mime type of the file, must match the extension.


  Should be provided one of the following mime types image/jpeg for .jpg/.jpeg, image/png for .png, image/gif for .gif, etc.
    Example: "application/pdf"

  - `file_size` (integer, required)
    Size of the file in bytes.
    Example: 1024000

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Success:
      - `file_id` (string, required)
        Unique identifier of the uploaded file.
      - `upload_url` (string, required)
        Pre-signed URL for file content upload.
    - Authentication failed:
      - `error` (object, required)
        Error object.
      - `error.code` (string, required)
        Unauthorized access due to invalid credentials.
        Example: "1.01"
      - `error.messages` (array, required)
        Array of error messages applied to the decline payment.
        Example: ["Authentication failed"]
    - Error:
      - `error` (object, required) — one of (discriminator: code):
        Error object.
        - 2.01 Invalid request:
          - `message` (string, required)
            Invalid request.


  Missing or incorrect parameters.
          - `constraints` (object)
            Constraints for invalid request parameters.
          - `constraints.file_type` (array)
          - `constraints.file_type.code` (string)
            Error code for invalid file extension.
            Example: "InvalidExtension"
          - `constraints.file_type.message` (string)
            Message explaining why the file extension is not supported.
            Example: "file_type extension is not supported"
          - `constraints.file_size` (array)
          - `constraints.file_size.code` (string)
            Error code for invalid file size.
            Example: "InvalidSize"
          - `constraints.file_size.message` (string)
            Message explaining why the file size is not allowed.
            Example: "file_size must be less than 52428800 bytes"
        - 2.01 File size exceeded:
          - `message` (string, required)
            File size exceeded.


  Evidence file size exceeds the allowed limit.
        - 2.01 File type not supported:
          - `message` (string, required)
            File type not supported.


  Evidence file type is not suitable.
      - `error.code` (string)


