# Perform bulk operations on the status reports

It is possible to perform bulk operations on the status reports through a
POST on the /{custNr}/fax/reports endpoint. The required parameters are:

  * the type of action to be performed
  * A list of Job IDs on which the operation should be performed

Status reports are available for up to 30 days or until deleted.

The maximum number of jobs per POST request is set to 1000.

Please note: This edpoint should only be used with a datza center specifc URL. This endpoint could return an error about unknown job IDs depending on the data center the request is processed by.

Endpoint: POST /{custNr}/fax/reports
Version: v1
Security: httpBasicAuth

## Path parameters:

  - `custNr` (string, required)
    Customer Number

## Request fields (application/json):

  - `action` (string, required)
    Defines the action to be performed on all jobs whose
Job ID is provided in the jobIds list

Possible options are:

* DELETE: Bulk delete the requested jobs
* GET: Bulk get the requested jobs

Both options are case insensitive.

  - `jobIds` (array, required)
    List of Job IDs to be processed in bulk

## Response 200 fields (application/json):

  - `reports` (array)

  - `reports.jobId` (string, required)
    The Job ID.

  - `reports.recipientStatus` (array)

  - `reports.recipientStatus.number` (string, required)
    The fax recipient's primary number (international format, e.g., +49891234678).

  - `reports.recipientStatus.properties` (array,null)
    Personalized data used for the cover page.

  - `reports.recipientStatus.properties.key` (string, required)
    Name of the key.
    Example: "key123"

  - `reports.recipientStatus.properties.value` (string, required)
    The value assigned to the key.
    Example: "value123"

  - `reports.recipientStatus.status` (string, required)
    Job status. See TBD for more information

  - `reports.recipientStatus.reason` (string, required)
    Explanation of the status.

  - `reports.recipientStatus.sentTs` (string)
    Timestamp which indicates when the fax was sent (in ISO 8601 format).

  - `reports.recipientStatus.durationInSecs` (integer, required)
    Duration of the fax transmission until received by the fax recipient.

  - `reports.recipientStatus.sentToNumber` (string)
    Number to which the fax was sent.

  - `reports.recipientStatus.remoteCsid` (string)
    Fax ID which identifies the fax recipient.

  - `reports.pages` (integer)
    Number of pages in the fax. Only present for responses to a bulk GET.

  - `reports.reference` (object)

  - `reports.reference.customerDefinedId` (string)
    Freely-defined ID string (max. 256 characters).
    Example: "2022-04-7T11:04:37.057Z_customerDefinedId"

  - `reports.reference.billingCode` (string)
    Information on the cost center; format is arbitrary (max. 80 characters).
    Example: "2022-04-7T11:04:37.057Z_billingCode"

  - `reports.reference.billingInfo` (string)
    Additional data for internal customer accounting (max. 80 characters).
    Example: "2022-04-7T11:04:37.057Z_billingInfo"

  - `reports.deleted` (boolean)
    Information whether the job report could be deleted.

Only present for responses to a bulk DELETE.

  - `reports.reason` (boolean)
    Missing if deletion was successful, otherwise one of the following
reason messages is returned:

* NOT_FOUND: No report exists for the given job id.
* INTERNAL_ERROR: Unspecified server-side error.

Only present for responses to a bulk DELETE.


