Skip to main content
POST
/
referrals
/
{id}
/
import_events
Import previous sales from stripe
curl --request POST \
  --url https://api.firstpromoter.com/api/v2/company/referrals/{id}/import_events \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>'
{
  "id": 123,
  "status": "pending",
  "total": 123,
  "selected_total": 123,
  "processed_count": 123,
  "failed_count": 123,
  "action_label": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "meta": {},
  "progress": 123,
  "processing_errors": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations → Manage API Keys

Headers

Account-ID
string
required

Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations

Path Parameters

id
string
required

ID of the referral

Query Parameters

find_by
enum<string>

Find by attribute

Available options:
email,
uid,
username

Response

Import task accepted

id
integer

Id of the batch operation

status
enum<string>

Status of the batch operation

Available options:
pending,
completed
total
integer

Total number of items

selected_total
integer

Number of selected items

processed_count
integer

Number of processed items

failed_count
integer

Number of failed operations

action_label
string

Action identifier/ label assigned to the action

created_at
string<date-time>

Date and time when the batch operation was created

updated_at
string<date-time>

Date and time when the batch operation was updated

meta
object

Meta data of the batch operation

progress
integer

Progress of the action (0-100)

processing_errors
string[]

List of processing errors

I