---
updatedAt: 2026-04-20T19:14:03.000Z
agentTools:
  projectIndex: https://docs.paymentlabs.io/llms.txt
---

# Get Import

Returns one import with its status and row counts.

Poll it after uploading the file, until `status` is `ready`, `processed_with_errors` or `processing_failed`. After Finish
Import, poll it until `status` is `finished`; `entries.processed` then counts the payments created.

Requires the **Read** permission.

**Errors**
- `404 NOT_FOUND`: the import does not exist in your account.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payout API Specification",
    "version": "0.0.1",
    "description": "Describes the operations a Payor can do to manage payments"
  },
  "paths": {
    "/batches/{batchId}/imports/{importId}": {
      "get": {
        "operationId": "Get Import Endpoint",
        "tags": [
          "Payment Import"
        ],
        "description": "Returns one import with its status and row counts.\n\nPoll it after uploading the file, until `status` is `ready`, `processed_with_errors` or `processing_failed`. After Finish\nImport, poll it until `status` is `finished`; `entries.processed` then counts the payments created.\n\nRequires the **Read** permission.\n\n**Errors**\n- `404 NOT_FOUND`: the import does not exist in your account.",
        "summary": "Get Import",
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "description": "ID of the batch, as returned by Create Batch.",
            "schema": {
              "description": "ID of the batch, as returned by Create Batch.",
              "example": "B-01K8ZQ4T7V9XBP2D3M5NF6R8AC",
              "type": "string",
              "title": "batchId"
            }
          },
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "description": "ID of the import, as returned by Create Import.",
            "schema": {
              "description": "ID of the import, as returned by Create Import.",
              "example": "I-01K8ZQ9R4Y6AET7H9R2VL3W5XD",
              "type": "string",
              "title": "importId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The import.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportDto"
                }
              }
            }
          },
          "401": {
            "description": "The request has no valid access token. Get a new token from `POST /login` and send it as `Authorization: Bearer <token>`.\n\nCodes: `UNAUTHORIZED_NO_TOKEN` (no `Authorization` header), `UNAUTHORIZED_INVALID_TOKEN` (expired or malformed token),\n`UNAUTHORIZED_NO_CONTEXT` (the token does not belong to a payor or merchant), `UNAUTHORIZED_NO_PAYOR` (the token gives access\nto more than one payor and the request did not send `x-payor-id`). A few endpoints answer from the API gateway instead and\nreturn only `{\"message\": \"Unauthorized\"}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason. Absent when the API gateway rejects the request.",
                      "enum": [
                        "UNAUTHORIZED_INVALID_TOKEN",
                        "UNAUTHORIZED_NO_CONTEXT",
                        "UNAUTHORIZED_NO_PAYOR",
                        "UNAUTHORIZED_NO_TOKEN"
                      ],
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but is not allowed to perform this operation.\n\nCodes: `FORBIDDEN_INSUFFICIENT_TAGS` (your credential's role does not allow this operation), `FORBIDDEN_CONDITION_NOT_MET`\n(the payment amount is above your approval limit). Some endpoints add their own codes; they are listed in the endpoint\ndescription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason.",
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist in your account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ],
                      "title": "code"
                    },
                    "message": {
                      "description": "Names the missing resource, for example `Provided batch was not found`.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.paymentlabs.io",
      "description": "Sandbox Server"
    },
    {
      "url": "https://api.paymentlabs.io",
      "description": "Production Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "scheme": "bearer",
        "type": "http",
        "bearerFormat": "JWT",
        "description": "Bearer Token using JWT"
      }
    },
    "schemas": {
      "ImportDto": {
        "description": "An import: a CSV or Excel file of payments being loaded into a batch.",
        "title": "ImportDto",
        "type": "object",
        "properties": {
          "importId": {
            "description": "ID of the import: `I-` followed by 26 characters.",
            "type": "string",
            "title": "importId"
          },
          "batchId": {
            "description": "ID of the batch the payments are imported into.",
            "type": "string",
            "title": "batchId"
          },
          "batchName": {
            "description": "Name of that batch.",
            "type": "string",
            "title": "batchName"
          },
          "payorId": {
            "description": "Your payor ID.",
            "type": "string",
            "title": "payorId"
          },
          "file": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportFileDto"
              }
            ],
            "description": "The uploaded file."
          },
          "entries": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportEntriesDto"
              }
            ],
            "description": "Row counts of the file."
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImportStatus"
              }
            ],
            "description": "Where the import is in its lifecycle. See the `ImportStatus` schema."
          },
          "createdBy": {
            "description": "ID of the user or API credential that created the import.",
            "type": "string",
            "title": "createdBy"
          },
          "createdAt": {
            "description": "When the import was created, in ISO 8601 UTC.",
            "format": "date-time",
            "type": "string",
            "title": "createdAt"
          },
          "updatedBy": {
            "description": "ID of the user or API credential that last changed the import.",
            "type": "string",
            "title": "updatedBy"
          },
          "updatedAt": {
            "description": "When the import last changed, in ISO 8601 UTC.",
            "format": "date-time",
            "type": "string",
            "title": "updatedAt"
          }
        },
        "required": [
          "batchId",
          "entries",
          "file",
          "importId",
          "payorId",
          "status"
        ]
      },
      "ImportFileDto": {
        "description": "The file of an import.",
        "title": "ImportFileDto",
        "type": "object",
        "properties": {
          "name": {
            "description": "File name, as sent to Create Import.",
            "type": "string",
            "title": "name"
          },
          "mimeType": {
            "description": "File type: `text/csv` or `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`.",
            "type": "string",
            "title": "mimeType"
          },
          "size": {
            "description": "File size, in bytes.",
            "type": "number",
            "title": "size"
          }
        },
        "required": [
          "mimeType",
          "name"
        ]
      },
      "ImportEntriesDto": {
        "description": "Row counts of an import file.",
        "title": "ImportEntriesDto",
        "type": "object",
        "properties": {
          "total": {
            "description": "Number of payment rows in the file.",
            "type": "number",
            "title": "total"
          },
          "processed": {
            "description": "Payments created from the file. Counts up after Finish Import.",
            "type": "number",
            "title": "processed"
          },
          "validated": {
            "description": "Rows checked so far, valid or not.",
            "type": "number",
            "title": "validated"
          },
          "failed": {
            "description": "Rows that are invalid and cannot become payments.",
            "type": "number",
            "title": "failed"
          }
        }
      },
      "ImportStatus": {
        "description": "Status of an import:\n\n- `created`: waiting for the file upload.\n- `processing`: the file arrived and its rows are being checked.\n- `ready`: every row is valid. Finish or delete the import.\n- `processed_with_errors`: some rows are invalid. Review them with Get Import Rows, then finish with `importValid` or delete the import.\n- `processing_failed`: the file could not be read or has no rows. Delete the import and upload a corrected file.\n- `finishing`: payments are being created.\n- `finished`: payments were created for the valid rows.",
        "title": "ImportStatus",
        "enum": [
          "created",
          "finished",
          "finishing",
          "processed_with_errors",
          "processing",
          "processing_failed",
          "ready"
        ],
        "type": "string"
      }
    }
  }
}
```