Skip to content
Batch Printing

Create or Update Batch Report

Create or update a report configuration under a specified export batch.

Provide id to update an existing configuration, or omit it to create a new one.

Request parameters

  • Required: batch_id (batch ID), report_id (report ID), file_type (export file type), remark (remark), porter_params (report query/export parameters)
  • Optional: id (report config ID, provide when updating), new_ver (whether to use the new version)
  • porter_params is a key-value object whose fields depend on the report.

Result

On success, the business result is in data. Interpret the outcome together with the business code.

POSThttps://b-api.lbkrs.com/report/export/upsert_batch_report

Production: https://b-api.lbkrs.com · Test: https://b-api.longbridge.xyz

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

report.export_batches_query

The Broker ACCESS_TOKEN must be granted the permission below, or the call will be rejected.

Request body application/json

idstring

Report configuration ID. Provide it to update; omit it to create.

batch_idstringrequired

Batch ID.

report_idstringrequired

Report ID.

file_typestringrequired

Export file type.

remarkstringrequired

Remark.

porter_paramsobjectrequired

Report query/export parameters, as a key-value object whose fields depend on the report.

new_verboolean

Whether to use the new version.

Responses

HTTP 200The request was processed successfully. The result is in data; this endpoint has no documented response fields, so data is usually an empty object.
Standard response envelopecodemessagedata
dataobjectdata structure

Business result. This endpoint has no documented response fields and is usually an empty object.

No nested fields

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs