Skip to main content
POST
/
api
/
adm
/
backgroundProcesses
Create Background Process
curl --request POST \
  --url https://localhost:44371/api/adm/backgroundProcesses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "BackgroundProcessType.ExportReport",
  "priority": "BackgroundProcessPriority.High",
  "data": {
    "ExportReportParameters": {
      "UserEmail": "[email protected]",
      "Url": "/reports/transactions"
    }
  }
}
'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Initiates a new background process that will execute asynchronously. The process is created in Pending status and will transition to Running once picked up by the background worker. Use the returned process ID to monitor progress via the GetEntries endpoint.

Input

  • Body: inputModel (BackgroundProcessCreateCommandRequest, required) — Process configuration including:
    • processType (string, required) — Type of process to execute (e.g., ImportTransactions).
    • companyProjectId (guid, optional) — Associated company project identifier.
    • settings (string, optional) — JSON string containing process-specific configuration.

Output

Returns a BackgroundProcessCreateCommandResponse containing the ID of the newly created process.

Example Request

POST /api/admin/backgroundProcesses
Content-Type: application/json
Authorization: Bearer {token}

{
  "processType": "ImportTransactions",
  "companyProjectId": "7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a",
  "settings": "{\"filePath\":\"imports/transactions_2025.csv\",\"validateOnly\":false}"
}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Errors

  • 400 Bad Request — Missing required fields, invalid process configuration, or malformed settings JSON.
  • 404 Not Found — Referenced company or project does not exist.
  • 500 Internal Server Error — Unsupported process type specified.

Notes

  • The process starts in Pending status and transitions to Running automatically.
  • Use the returned ID to monitor process status via the GetEntries endpoint.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The command request specifying the process type, configuration, and execution parameters.

Represents the payload required to queue a new background process entry.

type
enum<string>

Type of background process to create.

Available options:
AccountUpdaterUploadFile,
AccountUpdaterDownloadFile,
DownloadChargebackReport,
ProcessImportBatches,
ReportDataSync,
CompanyProjectKeysRegenerate,
ServiceIndexes,
DownloadPurchaseRefundReport,
ExportReport,
CompanyAccessKeyExpiration,
CreateTransactionsFromChargebacks
Example:

"BackgroundProcessType.ExportReport"

priority
enum<string>

Priority assigned to the background process.

Available options:
Normal,
High
Example:

"BackgroundProcessPriority.High"

data
object

Payload data supplied to the background process.

Example:
{
"ExportReportParameters": {
"UserEmail": "[email protected]",
"Url": "/reports/transactions"
}
}

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Represents the response returned after a background process command executes.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null