Skip to content

Reset sandbox data

POST
/open/sandbox/reset

Clear test data for one sandbox wallet that is yours. After a reset an externalref can be used again. Sandbox only.

science

Sandbox Simulation Mode

All actions on this page are fully simulated. No real accounts are created, and no real money is debited or credited. Use this environment to safely test your integration workflow.

history

Request History

Your request history will appear here.

Headers

X-API-USER stringrequired

Your Moolre username.

X-API-KEY stringoptional

Your wallet private API key. A public key is refused.

Body Params

accountnumberstringrequired

Your sandbox wallet account number.

scopestringoptional

What to reset. Leave it out for all.

  • allEverything below (the default).
  • transactionsDeletes transactions, their metadata, OTP-verified phones and idempotency keys, and restores the balance.
  • balanceRestores the balance only: to balance when you send it, otherwise the starter balance.
  • webhooksDeletes webhook deliveries and their attempts.
  • bulkDeletes bulk payout batches, their items and events.
  • invoicesDeletes invoices.
balancestringoptional

The balance to restore, for example 1000.00.

Responses

The number of rows deleted per table and the new balance.

statusinteger
1 for success
codestring
Response code, SBR01
messagestring
Response message
dataobject
Result
gonull
Navigation hint
metaobject
Always present. meta.requestid is the unique id of this request (also the X-Request-Id header); quote it to support. meta.notices is an array, empty when there is nothing to report. meta.replayed is true only on an idempotent replay.
{  "status": 1,  "code": "SBR01",  "message": "Sandbox data reset.",  "data": {    "deleted": {      "transactions": 12,      "webhook_deliveries": 4    },    "balance": "1000.00"  },  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

scope is not one of the allowed values.

statusinteger
0 for failure
codestring
Response code, for example SBR03
messagestring
Error message
datastring | object | null
The failing field, or details
metaobject
Always present: meta.requestid (the unique id of this request) and meta.notices (an array)
{  "status": 0,  "code": "SBR03",  "message": "scope must be one of all, transactions, balance, webhooks, bulk, invoices.",  "data": "scope",  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

Fields every response can carry

On failures, read code, message and data (the first failing field). meta is always present and holds requestid (also the X-Request-Id header), notices and, only on idempotent replays, replayed. There is no outcome field: use status, code and data.txstatus. Send X-Moolre-Http-Status: strict to receive real HTTP status codes. See Responses and request IDs and Errors and status codes.

Language

curl --request POST \     --url 'https://sandbox.moolre.com/open/sandbox/reset' \     --header 'X-API-USER: Your Username' \     --header 'Content-Type: application/json' \     --data '{  "accountnumber": "",  "scope": "all",  "balance": "1000.00"}'

Response

Body

{  "status": 1,  "code": "SBR01",  "message": "Sandbox data reset.",  "data": {    "deleted": {      "transactions": 12,      "webhook_deliveries": 4    },    "balance": "1000.00"  },  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}