Returning.AIDocs
v1

API reference / Gamification / Loyalty Points

.md

Create loyalty points export

Request a CSV or JSON file of recorded loyalty history for a date range.

Last updated 21 Nov 2026API v1

Method
POST
Path
https://api.returning.ai/v1/loyalty-exports
Permission
customerSuccess
Retries
Retry uncertain requests with the same API key, Idempotency-Key and body.

When to use this

  • Load daily coin, XP or premium-currency history into your reporting system.
  • Extract a historical period across all customers or selected customer identifiers.

Authentication#

Header
Authorization: Bearer <API_KEY>
Permission
customerSuccessShown in the dashboard as Customer Success.

Use a Community API key with customerSuccess, shown as Customer Success in the dashboard. Keep the key on your backend and send Authorization: Bearer <API_KEY>. The key selects the community; do not send a community ID. Personal API keys are not supported.

All three calls use https://api.returning.ai and return Cache-Control: no-store. They accept no query parameters. A valid community key with the required permission can read that community's export jobs, including jobs created by another key in the same community.

Successful responses contain meta, message and data. Read job state from data.status. An HTTP 200 means the status request succeeded, even when the job is failed. Errors put their machine-readable code in meta.code; do not branch on message.

Behaviour#

Request export -> save export_id -> poll status -> get download link -> download the file.

This creates a report job and does not change balances. Version 1 remains the default and exports ordinary reward coins. Version 2 adds currency selection, source classification and transaction metadata. It is not a store-orders feed, current-balance snapshot or pre-calculated BI totals.

Start here: a daily export

You need a backend process, a Community API key with Customer Success permission, and somewhere private to store the downloaded file. The examples on this page use synthetic dates and identifiers; choose a completed period that contains your own activity.

StepCallSave or check
1. Request the filePOST /v1/loyalty-exportsSave your request body and idempotency key before sending. Save data.export_id from the response.
2. Wait for completionGET /v1/loyalty-exports/{exportId}Continue only for queued or processing. Download only after completed.
3. Get a temporary linkGET /v1/loyalty-exports/{exportId}/downloadUse data.url promptly. Do not log it.
4. Download and importHTTPS GET to data.urlSend no API key. Check row count and byte size against status, then import.

The three API calls need your key. The file download uses the temporary URL instead. There is no webhook, list-jobs or public cancel call in this three-endpoint workflow, so retain the export ID yourself and poll status.

Choose the date window

The filter uses when each history entry was recorded, not when its original trade or activity happened. start_at is included and end_at is excluded. Both must be UTC timestamps ending in Z, with at most three fractional-second digits.

Reporting daystart_atend_at
1 September in UTC2026-09-01T00:00:00.000Z2026-09-02T00:00:00.000Z
1 September in a UTC+08:00 business timezone2026-08-31T16:00:00.000Z2026-09-01T16:00:00.000Z

For a timezone that observes daylight saving, convert each local midnight separately; a local day can be 23 or 25 hours. The API does not accept a timezone parameter. Run your daily process after the interval closes: an end time in the future is rejected.

Adjacent days share one boundary. A record exactly at 2026-09-02T00:00:00.000Z belongs to the next UTC day, not both. Historical backfills can use wider intervals, but use sequential windows for easier recovery. There is no maximum range duration in the request validator and no promised completion time or unlimited file size.

Copy-and-run CSV example

Download the complete Python example. It requires Python 3.10 or newer and no third-party packages. Supply your API key through your backend's environment or secret manager as RETURNING_API_KEY.

BASH
python3 export-loyalty-points.py \
  --start '2026-09-01T00:00:00.000Z' \
  --end '2026-09-02T00:00:00.000Z' \
  --schema-version 2 --currency coins --currency xp --currency premium \
  --state export-2026-09-01.state.json \
  --out points-2026-09-01.csv

Omit --schema-version and --currency for the unchanged version 1 CSV. With --schema-version 2, omit --currency for coins only. Keep these choices unchanged on resume.

Omit --client-ref to include all customers. To select customers, add --client-ref '000101' --client-ref '000102'. For a single date range, use the same selection on every resume.

The example persists an idempotency key before creation, saves the export ID, polls with backoff, downloads without forwarding the API key, and checks the CSV header, row count and byte size. It streams CSV to a temporary file and replaces the output only after those checks pass. An empty report still produces a valid header-only CSV.

If it times out, rerun the same command with the same state file and API key. The default ten-minute polling budget is a client choice, not an API guarantee. --max-wait 1200 changes that budget. If a request is accepted but the response is lost, the saved key lets the next run recover the original job.

Use one process per state file and serialize exports for each community. Keep state and CSV files private. Use a distinct state file for each deliberately new report; deleting state or changing API keys after an uncertain request can create a different job. The example is a starting point for a backend process, not a scheduler or warehouse importer. It replaces the chosen output file after verification, so choose an export-specific output path.

Manual status and download calls

After the create request shown below returns an export ID, use it in both follow-up URLs:

BASH
curl --fail-with-body \
  'https://api.returning.ai/v1/loyalty-exports/66f000000000000000000701' \
  --header 'Authorization: Bearer <API_KEY>'

Wait until data.status is completed, then request the link:

BASH
curl --fail-with-body \
  'https://api.returning.ai/v1/loyalty-exports/66f000000000000000000701/download' \
  --header 'Authorization: Bearer <API_KEY>'

curl --fail --output points.csv '<TEMPORARY_DOWNLOAD_URL>'

Replace the synthetic export ID with your returned ID and the final URL with data.url. Copy the full URL, including its query string, and keep it quoted. The last command has no Authorization header.

Request#

Headers#

Authorization#stringREQUIRED
Community API key with Customer Success permission. The key selects the community.

RuleBearer <API_KEY>

Idempotency-Key#stringREQUIRED
Unique key for one intended export; reuse with the same body after an uncertain response.

Rule1-128 characters; first ASCII letter, digit, _ or -; remaining characters may also include . and :

Eg9b629318-5c67-4799-8135-27a64f1fc529

Content-Type#stringREQUIRED
Request body format.

Ruleapplication/json

Body#

The body must be JSON and at most 1 MiB. Unknown body fields are rejected. An empty client_refs array is invalid; it does not mean all customers.

Choose the file version

The endpoint path stays /v1/loyalty-exports for both file versions. Send schema_version: 2 for version 2. Omit it for version 1; schema_version: 1 is not accepted. Version 1 keeps its existing columns and excludes XP and premium currency.

For version 2, currencies accepts one to three unique values: coins, xp, premium. Omit it for coins only. An empty array, duplicate values, unsupported values, or currencies without schema_version: 2 returns 400 VALIDATION_ERROR.

To select customers and request a version 2 JSON file containing all three currencies, use:

JSON
{
  "dataset": "points_transactions",
  "format": "json",
  "schema_version": 2,
  "currencies": ["coins", "xp", "premium"],
  "start_at": "2026-09-01T00:00:00.000Z",
  "end_at": "2026-09-02T00:00:00.000Z",
  "client_refs": ["000101", "000102"]
}

References use your community's active customer identifier. Do not assume this is the Returning.AI user ID. Text identifiers preserve case, spaces and leading zeroes. Numeric identifiers use canonical numeric text: 000101 does not match a numeric identifier stored as 101.

Selection is resolved during processing. An unknown or ambiguous selected identifier fails the job rather than returning a partial selection. Without a selection, unresolved identifiers can appear as null in JSON or blank in CSV. Identifier values are resolved when the report runs, not as they were at the historical event time.

dataset#stringREQUIRED
Recorded loyalty history. Version 1 exports ordinary reward coins; version 2 exports the selected currencies.

Rulepoints_transactions

format#stringREQUIRED
Output file format. JSON has additional detail fields.

Rulecsv or json

Eg"csv"

schema_version#integerOPTIONAL
Send 2 to request version 2. Omit for the unchanged version 1 format; do not send 1.

RuleOptional; only 2 is accepted

Eg2

currencies#array of stringsOPTIONAL
Version 2 only. Select coins, xp or premium; omit for coins only.

Rule1-3 unique values; requires schema_version 2; empty or duplicate values are rejected

Eg["coins", "xp", "premium"]

start_at#stringREQUIRED
Inclusive UTC recording time, ending in Z.

RuleAt most three fractional-second digits

Eg"2026-09-01T00:00:00.000Z"

end_at#stringREQUIRED
Exclusive UTC recording time after start_at and no later than now.

RuleNo maximum range duration

Eg"2026-09-02T00:00:00.000Z"

client_refs#string[]OPTIONAL
Optional exact customer identifiers from the community's active identifier field. Omit for all customers.

Rule1-1,000 unique nonblank strings, each at most 1,024 characters; no control characters

curl --request POST \
  --url https://api.returning.ai/v1/loyalty-exports \
  --header 'Authorization: Bearer <API_KEY>' \
  --header 'Idempotency-Key: 9b629318-5c67-4799-8135-27a64f1fc529' \
  --header 'Content-Type: application/json' \
  --data '{
    "dataset": "points_transactions",
    "format": "csv",
    "schema_version": 2,
    "currencies": ["coins", "xp", "premium"],
    "start_at": "2026-09-01T00:00:00.000Z",
    "end_at": "2026-09-02T00:00:00.000Z"
  }'

Response#

New jobs return 202. An exact replay returns 200 with the original job's current state. Save data.export_id; acceptance does not mean the file is ready. There is no success meta.code or returned polling interval.

Version 2 CSV columns

CSV is UTF-8 with these 12 columns in this order. Null values are blank cells. Import identifiers and amounts as text, then parse amounts with a decimal-aware reader.

ColumnMeaning
client_refYour configured customer identifier; blank if unresolved. Preserves text identifiers such as leading zeroes.
event_idStable identifier for this recorded event and currency. Treat it as opaque and use it for upserts across overlapping exports.
recorded_at_utcUTC recording timestamp used by the date filter, not the original trade or activity time.
currencycoins, xp or premium, restricted to your request's selection.
operationincrease, decrease, overwrite, expiry or unknown; see the interpretation rules below.
amountSigned stored numeric amount as text, or blank if invalid. An overwrite's amount is the assigned balance.
channelRecorded source category from the channel table below. It does not certify the business reason.
labelRecorded name for a bulk update, integration, booster, milestone, store item or leaderboard; blank when unavailable. Free text, not a stable category or ID.
source_typeType of source reference supported by this row, or blank. See the source table below.
source_idReference for source_type, or blank. Not a guaranteed trade or order ID.
quality_notesRow-specific notes separated by semicolons, in the order listed below; blank when none apply.
metadataJSON object encoded in a CSV cell, or blank when absent. Parse the CSV first, then parse this cell as JSON.

Rows are newest first by recording time with stable tie ordering. Ordinary zero-movement rows are excluded, but overwrites to zero are kept. A single recorded award carrying both coin and premium amounts can produce two rows with different event IDs; XP has its own event IDs. Coin event IDs are compatible with version 1. Do not deduplicate different currencies by source_id.

Text cells beginning with a spreadsheet formula marker after optional whitespace are prefixed with an apostrophe for spreadsheet safety. Signed amount cells are exempt. JSON retains the original text, so prefer JSON when exact text matching matters.

Version 2 JSON fields

JSON is one array of objects, not JSONL. It includes all 12 CSV fields: client_ref, label, source_type and source_id are strings or null; amount is a string or null; event_id, recorded_at_utc, currency, operation and channel are strings. quality_notes is an array of strings, and metadata is an object of string values or null. JSON includes these additional fields:

JSON fieldTypeMeaning
schema_versionintegerAlways 2.
community_idstringCommunity selected by the API key.
returning_user_idstringReturning.AI user ID; distinct from your configured client_ref.
occurred_at_utcnullOriginal activity time is not recorded here. Use recorded_at_utc for extraction.
premium_currency_idstring or nullRecorded premium-currency identifier on premium rows when available; null on other currencies. CSV does not include this identifier.
absolute_balancestring or nullAssigned balance for an overwrite, equal to amount; otherwise null.
raw_actionstringJSON-encoded recorded action data, not a nested JSON array.
source_referencestring or nullOriginal correlation reference. It can differ from the normalized source_id and is not a guaranteed trade or order ID.

A nonempty metadata value looks like {"business_line_id":"line-001"} after parsing. The export does not return a manifest or checksum through these three endpoints.

Channels and labels

Classification uses the recorded action structure, not words in the label. A label containing "trade" does not establish a trade category. Missing, malformed or unrecognized actions become other.

channelRecorded origin
apiDirect API award or adjustment.
admin_or_unattributedAdjustment without a more specific recognized origin.
boosterBooster reward.
bulk_updateUser bulk update, including rewards written by a data workflow's Users Bulk Update step.
daily_visitVisit reward.
expiryCoin expiry.
integrationConnected data integration award.
leaderboardLeaderboard award.
milestoneMilestone stage or group reward.
mini_gameSpin result, raffle ticket purchase/refund, or match prediction entry/payout/refund.
otherMissing, malformed or unrecognized origin.
referralReferral or referral-condition reward.
socialSocial reward.
storeReward redemption or product refund; not an order record.
streakVisit-streak reward.
tierLevel or tier change.
workflowDirect workflow action marked as such, distinct from a Users Bulk Update award.

label is copied as recorded, including spaces, for the supported origins listed in the CSV table. It is null or blank for other origins, including direct workflow actions. Labels can change and are not evidence of a trade ID.

Source references

source_typeMeaning of source_id
milestone_stageMilestone stage identifier.
milestone_groupMilestone group identifier.
spin_resultSpin result reference.
raffleRaffle reference for a ticket purchase or refund.
match_predictionMatch prediction reference for an entry, payout or refund.
coin_expiry_policyCoin-expiry policy reference.
boosterBooster reference.
leaderboardLeaderboard reference.
history_groupCorrelation reference on a bulk-update award; may link coin, XP and premium rows written together. It is not a business transaction ID.

Source fields are populated only when the recorded action and reference support the mapping. Milestone references are normalized to the stage/group ID; premium reference suffixes are removed. Store rows deliberately leave both source fields empty even if JSON has a source_reference. A missing reference leaves source fields empty. A milestone reference that remains nonempty after normalization but cannot be parsed also adds source_unparsed.

Transaction metadata

metadata contains the transaction metadata columns configured on a data workflow's Users Bulk Update step and saved on that award. For example, map a feed's business line ID column to business_line_id to carry it alongside a trade reward. Metadata does not determine channel and does not turn a reward into a verified trade record.

Keys are configured names; values are strings with surrounding whitespace removed. Blank input cells do not create keys. Metadata keys are sorted in the exported object. Missing or empty metadata is null in JSON and blank in CSV, including older awards without saved metadata or awards whose selected cells were all blank. The export reads saved values; it does not look up missing values in your current feed or fill historical gaps.

Interpreting points correctly

operationHow to read amount
increasePositive recorded movement. Keep the sign.
decreaseNegative recorded movement. Keep the sign.
overwriteAssigned absolute balance, not points earned or a delta. An overwrite to zero is retained.
expiryRecorded expiry, distinct from an ordinary decrease; review any unexpected positive sign.
unknownInvalid or missing amount, represented as null in JSON or blank in CSV. Keep for review.

The operation decoder also recognizes zero, but those ordinary zero rows are excluded from the file. Overwrite detection takes precedence over the amount's sign. For example, an overwrite from 100 to 40 exports amount: "40"; its -60 effect cannot be calculated without a trustworthy prior balance. JSON also has absolute_balance: "40".

Amounts use ordinary numeric precision and may use scientific notation. Text does not certify arbitrary-precision accounting. Premium deductions marked requested_amount_may_exceed_applied can describe the requested deduction rather than the applied wallet change. Keep overwrites, invalid values and these deductions out of a simple earned-points total.

Quality notes

The first eight notes below can appear in both formats. CSV joins them with ; in this order and omits the three background notes shown as JSON only. JSON retains the full array.

Quality noteMeaning
requested_amount_may_exceed_appliedA premium bulk deduction may record more than the wallet actually lost because the applied balance is floored at zero.
dual_amount_documentOne recorded event carries both coin and premium amounts. Present even when your currency selection exports only one side.
absolute_overwrite_not_an_earnAssigned balance; exclude from a simple earned-points sum.
points_amount_invalidAmount is unknown, not zero. An overwrite can still be classified as an overwrite while its amount is null.
expiry_sign_unexpectedExpiry has a positive amount; review before aggregating.
client_ref_unresolvedNo configured customer identifier could be resolved for this row.
source_unparsedA recorded milestone reference could not be parsed into its supported source fields.
reversalRecorded action marks a reversal. Preserve its signed amount and do not count it as another earn.
original_event_time_not_recordedJSON only, on every row. Original activity time is unavailable.
business_reason_not_verifiedJSON only, on every row. Channel classification does not verify the business reason.
legacy_number_precision_unverifiedJSON only, when the amount was recorded as an ordinary numeric value; precision is not certified.

Retain unrecognized quality notes instead of rejecting the whole file.

Version 1 compatibility

Omitting schema_version keeps the unchanged version 1 coin-only export. Its CSV still has five columns: client_ref, event_id, recorded_at_utc, operation, points_delta. points_delta is the stored signed amount as text, or blank when invalid; for overwrites it is the assigned balance.

Version 1 JSON includes those five fields plus schema_version (1), community_id, returning_user_id, occurred_at_utc (null), currency_type (reward), absolute_balance (overwrite only, otherwise null), raw_action (JSON-encoded text), source_reference (string or null) and quality_notes (array). It has no version 2 channel, label, typed source or metadata fields. Version 2 uses amount instead of points_delta and currency instead of currency_type; update your importer before opting in.

Reconcile one feed

  1. Configure a stable business line ID as transaction metadata on your feed's Users Bulk Update step before awards are written. Retain the feed's customer identifier, expected currency and expected amount.
  2. Request version 2 for a closed recording-time window with the currencies that feed awards. Download after completion and check total_rows and file_size_bytes.
  3. Parse the CSV, then its nonblank metadata cells, or read JSON directly. Select channel: bulk_update and your configured metadata key. Use client_ref and the business line ID to match your feed. Keep missing metadata in a separate unmatched set.
  4. Upsert exported rows by event_id. Compare signed amount by business line and currency, keeping reversals signed and handling overwrites and quality notes separately. source_id can correlate sibling awards but does not replace your business line ID. Use JSON if you also need premium_currency_id.
  5. Investigate unmatched and qualified rows before declaring reconciliation complete. Re-export overlapping windows deliberately for late recordings, with new idempotency keys, and upsert again. The export does not certify applied balances or financial completeness.

Daily loads

Request consecutive UTC recording-time windows. Use event_id to avoid duplicate rows when intentionally repeating or overlapping windows. A new request rereads history; an idempotent replay returns the same job.

The export is not a transactional snapshot or a guaranteed change feed. Late records and historical edits can make a fresh export differ. Deleted historical events are not supplied as deletion records. coverage: observed_history_only means recorded history, not certified financial completeness. The export does not reconstruct every historical balance.

For current balance summaries, use Get loyalty overview. For order details and fulfilment state, use List redemption orders by community.

Make a daily import reliable

  1. Choose the closed recording-time window and persist the request body, API key identity, idempotency key and eventual export ID in your own job record.
  2. Run only one active export for the community. On an uncertain create response, retry exactly; do not advance to the next window.
  3. After completion, download the file promptly, check its row count and byte size, and store it privately. A byte-size check detects an incomplete transfer; the API does not supply a cryptographic checksum.
  4. Upsert by event_id in your reporting store. Preserve client_ref as text, retain null/unknown values and quality notes, and handle overwrite rows separately.
  5. Advance your own import checkpoint only after the entire file has been imported successfully. If an import partially fails, reuse the saved file or download it again while available, and repeat the upsert.
  6. If your business needs reconciliation, deliberately re-export overlapping closed windows with new idempotency keys and deduplicate by event_id. Choose the overlap from your own source delays; the API does not promise a maximum lateness interval or a deletion feed.

This avoids checking each event against your database before requesting the API: the date filter selects the period and your import's upsert handles replayed rows. It does not add date filtering to the separate store-orders API.

Common questions

QuestionAnswer
Can I request yesterday only?Yes. Send yesterday's UTC recording-time boundaries, or convert the boundaries of your business timezone to UTC.
Does it return one row per customer with their balance?No. It returns recorded history events for the requested version and currencies. Use Get loyalty overview for current balance summaries.
Does it return store orders or ready-made BI totals?No. Use the order endpoints for orders and aggregate the exported history in your reporting system with the interpretation rules above.
Can I export all customers without paging?Yes. Omit client_refs; one job creates one file for the matching history. These endpoints have no page or cursor parameter.
Why is a successful file empty?No included history matched the requested interval and selection. Current balances alone do not imply activity in that interval.
Does retrying refresh old data?An idempotent replay returns the original job. Use a new key for a deliberately fresh extraction.
Can I recover a lost export ID?Retry the original body with the original key and API key. This family has no list-jobs endpoint, so save the ID yourself.
Can I use the file after its link expires?If the file is still available, get a new link. After the 24-hour file window expires, request a new export.
meta#objectALWAYS
Request result and support reference.

Eg{ ... }

status#stringALWAYS
Result of the request.

Rulesuccess

statusCode#integerALWAYS
HTTP status of the request.

Eg200

requestId#stringALWAYS
Support reference for this request.

Eg"example-request"

message#stringALWAYS
Human-readable summary. Do not branch on it.

Eg"Loyalty export accepted success."

data#objectALWAYS
Export job details.

Eg{ ... }

export_id#stringALWAYS
Save this ID for status and download requests.

Eg"66f000000000000000000701"

status#stringALWAYS
Current job state. Acceptance does not mean the file is ready.

Rulequeued, processing, completed, failed, cancelled or expired

Eg"queued"

dataset#stringALWAYS
The dataset requested.

Rulepoints_transactions

format#stringALWAYS
The requested file format.

Rulecsv or json

Eg"csv"

created_at#stringALWAYS
Job creation timestamp in UTC.

Eg"2026-09-03T01:00:00.000Z"

coverage#stringALWAYS
Recorded history only, not certified financial completeness.

Ruleobserved_history_only

{
  "meta": {
    "status": "success",
    "statusCode": 200,
    "requestId": "example-request"
  },
  "message": "Loyalty export accepted success.",
  "data": {
    "export_id": "66f000000000000000000701",
    "status": "queued",
    "dataset": "points_transactions",
    "format": "csv",
    "created_at": "2026-09-03T01:00:00.000Z",
    "coverage": "observed_history_only"
  }
}

Errors#

Fix the request13

400VALIDATION_ERRORFix the request
Remove unsupported query parameters and correct the request fields.
401AUTHENTICATION_REQUIREDFix the request
Send a valid Community API key in Authorization: Bearer <API_KEY>.
403API_KEY_PERMISSION_DENIEDFix the request
Use a Community API key with Customer Success permission.
403COMMUNITY_ACCESS_DENIEDFix the request
Use a Community API key, not a personal API key.
400INVALID_JSONFix the request
Send valid JSON.
409IDEMPOTENCY_CONFLICTFix the request
Restore the original body for a retry. Use a new key only for a deliberately new report.
413REQUEST_TOO_LARGEFix the request
Reduce the JSON body to at most 1 MiB.
415UNSUPPORTED_MEDIA_TYPEFix the request
Send UTF-8 application/json with a supported content encoding.
400Fix the request
Invalid request or unsupported query parameters.
401Fix the request
Missing or invalid API key.
403Fix the request
A Community API key with the required permission is needed.
413Fix the request
Request body exceeds 1 MiB.
415Fix the request
Use UTF-8 application/json.

Fix the data02

404COMMUNITY_NOT_FOUNDFix the data
Contact support about the community selected by your API key.
409Fix the data
Same key was used with different input.

Retry with backoff05

503EXPORTS_UNAVAILABLERetry with backoff
Retry with backoff. For create, preserve the original body and idempotency key.
500AUTHENTICATION_FAILEDRetry with backoff
Retry with backoff; contact support if authentication checks keep failing.
429EXPORT_IN_PROGRESSRetry with backoff
Wait at least Retry-After, currently 30 seconds. Check the active export status.
429Retry with backoff
A points export is already active; Retry-After: 30.
503Retry with backoff
Exports disabled or unavailable. Retry creation with the same idempotency key.

Retries

Idempotency is scoped to the community, API key ID and Idempotency-Key. Use the same API key, header and body after a timeout or uncertain response. Switching API keys does not replay the original request.

Dates are normalized to UTC millisecond strings and selected identifiers are sorted before comparison. Reordering the same selection is a replay. In version 2, currency order is also normalized: ["coins", "xp"] and ["xp", "coins"] replay the same request. Duplicate currencies are rejected before comparison. Omitting currencies and explicitly sending ["coins"] are different requests even though both export coins; do not add or remove the field on a retry. Changing the currency set or adding schema_version: 2 to a version 1 request is also a different request. Reusing a key with different input returns 409 IDEMPOTENCY_CONFLICT. Omitted selection and an explicit selection are different requests.

A replay returns the original job; it does not restart it, refresh its file or extend retention. There is no documented minimum idempotency-retention guarantee. Use a new key only for an intentional new extraction.

Only one export may be active per community. 429 EXPORT_IN_PROGRESS includes Retry-After: 30. Wait at least that long before retrying. If a known job remains queued for an unusually long time, contact support with its export ID and request ID. Changing the date range or creating new idempotency keys will not unblock it.

{
  "meta": {
    "status": "error",
    "statusCode": 400,
    "code": "VALIDATION_ERROR",
    "requestId": "req_example"
  },
  "message": "Loyalty export request error.",
  "detail": "Invalid request or unsupported query parameters."
}

Next step#

Get loyalty points export statusGET/v1/loyalty-exports/{exportId}Save export_id and poll until the job reaches a terminal state.