Sandbox/tests

A great way to run tests on the platform without extra costs or using up your free documents.

For context, we recommend reading how document creation and listing work first:

Creating a documentRetrieving documents

Creating Sandbox documents

Creating test documents only depends on a single attribute to be set in the document: "sandbox".

mutation CreateDocumentMutation(
  ...
) {
  createDocument(
    sandbox: true,
    document: $document,
    signers: $signers,
    file: $file
  ) {
  ...
  }
}

Done! Documents created with "sandbox" won’t consume credits, but since they are test documents, they will be deleted after a few days.

Until they are deleted, you can view them in the document listings on the dashboard if you enable the following option on the API keys page:

Retrieving Sandbox Documents

Just like in the dashboard, the document listing does not return sandbox documents by default.

To include them, you need to enable two specific flags.

Enabling sandbox document listing

To allow the listing to return documents created in sandbox mode, add the showSandbox flag in the query parameters:

query {
  documents(
    limit: 60, 
    page: 1,
    showSandbox: true
  ) {
  ...
  }
}

Listing only sandbox documents

You can also retrieve only the documents created in sandbox mode. To do that, add the onlySandbox flag in the query parameters:

query {
  documents(
    limit: 60, 
    page: 1,
    onlySandbox: true
  ) {
  ...
  }
}

You can check what each of these parameters means directly in the full GraphQL API documentation, under the Docs tab in Altair. Not sure how to access it? Check out our tutorial: Usando o Altair.

Para importar e usar no Postman

Last updated

Was this helpful?