Skip to main content
POST
/
billing
/
org
/
v1
/
reports
Create a new report generation task
curl --request POST \
  --url https://api.gcore.com/billing/org/v1/reports \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_code": "<string>",
  "parameters": {
    "date_from": "2025-01-01",
    "date_to": "2025-02-01"
  }
}
'
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "user_id": 123,
  "client_id": 123,
  "task_type": "ClosingPeriod",
  "status": "Pending",
  "processing_notes": {
    "celery_group_id": "<string>",
    "period": "<string>",
    "records_to_process": 123,
    "errors": [
      {}
    ],
    "warnings": [
      {}
    ]
  },
  "parameters": {
    "type": "<string>",
    "date_from": "2023-12-25",
    "date_to": "2023-12-25",
    "client_id": 123
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

template_code
string
required

Code of the report template to use for generating the report.

Minimum string length: 1
parameters
Report parameters · object

Parameters for the report. The keys and values should match the template's parameter definitions. See the reports templates operation for available templates.

Example:
{
"date_from": "2025-01-01",
"date_to": "2025-02-01"
}

Response

201 - application/json
uuid
string<uuid>
required
created_at
string<date-time>
required

Task creation time

updated_at
string<date-time>
required

Task update time

user_id
integer
required
client_id
integer
required
task_type
enum<string>
required
  • ClosingPeriod - closing_period
  • ImportData - import_data
  • Report - report
  • StopSubscriptions - stop_subscriptions
Available options:
ClosingPeriod,
ImportData,
Report,
StopSubscriptions
status
enum<string>
default:Pending
required
  • Pending - pending
  • InProgress - in_progress
  • Completed - completed
  • Failed - failed
  • Cancelled - cancelled
Available options:
Pending,
InProgress,
Completed,
Failed,
Cancelled
processing_notes
Processing notes · object
required

Processing notes. Contains additional information about the task processing.

parameters
Task parameters · object

Parameters for the task. The structure depends on the task type. For report tasks, see available templates and their parameters at the reports templates operation.