Browse documentation

Carebit API

Remote File Import Batches

The progress of files being imported in the background.

Endpoints

Scroll this page to read every Remote File Import Batches endpoint, or jump to one below.

get/v1/remote_file_import_batches/:id

Get a remote file import batch

Requires the write scope for the batch's resource type: letters.create, test_results.create, or notes.create. A request with the wrong scope returns 404 without revealing whether the batch exists.

Parameters

  • id

    path · required

    string

    -

Responses

200

The requested RemoteFileImportBatch.

  • completed_countintegerrequired

    The number of items that finished processing successfully.

  • created_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • failed_countintegerrequired

    The number of items that finished processing with an error.

  • idstring · uuidrequired

    The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.

  • itemsarrayrequired

    The import items in their original request order.

    • itemsobject
      • created_resourcestring | null · urirequired

        The URL of the resource created for a succeeded item. Null unless status is succeeded.

      • created_resource_idstring | null · uuidrequired

        The identifier of the resource created for a succeeded item. Null unless status is succeeded.

      • created_resource_typestring | nullrequired

        The type of resource created for a succeeded item. Null unless status is succeeded.

        Allowed values: null | Attachment | Letter | Note | TestResult

      • errorobject | nullrequired

        The failure details for this item. Null unless the item has failed.

        • codestring | nullrequired

          The machine-readable error code.

        • messagestring | nullrequired

          A message that explains how the item failed.

      • idstring · uuidrequired

        The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.

      • objectanyrequired

        Always remote_file_import_batch_item.

      • positionintegerrequired

        The zero-based position of the item in the submitted batch.

      • statusstringrequired

        The current download, validation, and malware-scanning status of the item.

        Allowed values: failed | pending | processing | succeeded

  • linksobjectrequired

    URLs to related resources.

    • selfstring · urirequired

      The full URL of a related resource.

  • objectanyrequired

    Discriminator value emitted at object.

  • resource_typestringrequired

    The type of resource created by every item in the batch.

    Allowed values: letter | note | test_result

  • statusstringrequired

    The current download, validation, and malware-scanning status of the batch.

    Allowed values: completed | pending | processing

  • total_countintegerrequired

    The total number of items submitted in the batch.

  • updated_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

Example
{
  "id": "ebc38802-f219-4c7b-8136-8e963a0c69e0",
  "object": "remote_file_import_batch",
  "completed_count": 0,
  "created_at": "2026-01-01T09:00:00Z",
  "failed_count": 0,
  "items": 
    
      "id": "57bed2bf-e2e1-463b-8a96-643e3817a8b8",
      "object": "remote_file_import_batch_item",
      "created_resource": "https://api.carebit.co/v1/letters/c3d4e5f6-0718-49ab-acde-f01234567890",
      "created_resource_id": "7e09a8e3-e3c1-4dee-863b-85d56e4329da",
      "created_resource_type": null,
      "error": null,
      "position": 0,
      "status": "failed"
    }
  ],
  "links": 
    "self": "https://api.carebit.co/v1/remote_file_import_batches/ebc38802-f219-4c7b-8136-8e963a0c69e0"
  },
  "resource_type": "letter",
  "status": "completed",
  "total_count": 1,
  "updated_at": "2026-01-01T09:00:00Z"
}
401

The access token is missing, invalid, expired, or revoked.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
403

The access token is disabled or the project cannot access this endpoint.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
404

The batch does not exist for your Organization, or your access token lacks the write scope for the batch's resource type.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
429

Too many requests.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}

Prefer plain text? Append ?format=md or send Accept: text/markdown to receive this page as raw Markdown.