Skip to content

FISCALISTO / API / REFERENCE

Reset the test data · Account

Open in ChatGPTOpen in ClaudeOpen in Cursor
POST
/v1/test_data/reset

Leaves test mode as new: each test issuer keeps its RFC and its test CSD but loses its invoices, customers, products, batches, links and downloads, and the test events and request log are deleted. Keys and webhooks stay. With seed (the default) it leaves 2 sample customers and 3 sample products. Only with an fk_test_ key; production is never touched.

Before you call

  • A test key (fk_test_): this doesn't exist in production.

  • A key for the whole account: not limited to some issuers or to a test environment.

Authorization

bearerAuth
headerAuthorizationBearer <key>

Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.

Headers

Idempotency-Key?string

Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge).

Length1 <= length <= 255

Request body

application/json
  1. body
seed?boolean

true (the default) to leave each test issuer 2 sample customers and 3 sample products. false to leave it empty.

Defaulttrue

Response body

OK.

application/json
  1. response

What was deleted (and created) when resetting the test data.

object*string

What kind of object it is («invoice», «customer»…).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

issuers*integer

How many test issuers were emptied (archived ones included).

Range-9007199254740991 <= value <= 9007199254740991
deleted_rows*integer

How many records were deleted: invoices, customers, products, batches, links, downloads…

Range-9007199254740991 <= value <= 9007199254740991
deleted_events*integer

How many test events were deleted (with their deliveries).

Range-9007199254740991 <= value <= 9007199254740991
customers_created*integer

Sample customers created (with seed).

Range-9007199254740991 <= value <= 9007199254740991
products_created*integer

Sample products created (with seed).

Range-9007199254740991 <= value <= 9007199254740991

Errors

  • This exists only in test mode: use your fk_test_ key.

  • This key is limited to some issuers and the request touches another one (or creates one, or uses something of the whole account, like webhooks).

  • You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.

Plus those of any call (key, fields, limits): Errors. They all carry code, message and, when it's about a field, param.

curl -X POST 'https://api.fiscalisto.com/v1/test_data/reset' \  -H 'Authorization: Bearer fk_test_…' \  -H 'Idempotency-Key: pedido-A-1042' \  -H 'Content-Type: application/json' \  -d '{  "seed": true}'
{  "object": "test_data_reset",  "livemode": false,  "issuers": 1,  "deleted_rows": 214,  "deleted_events": 37,  "customers_created": 2,  "products_created": 3}

Was this page helpful?