Skip to main content

authorizeExport

Requires at least one of the permissions inventory:stock_adjustment:export, inventory:stock_transfer:export, payments:collection:export, payments:invoice:export, payments:payment:export, purchase:grn:export, purchase:payment:export, purchase:purchase_invoice:export, purchase:purchase_order:export or sales:sales_order:export.

Checks that you may export the given document type and says whether the organization requires the export to be encrypted. It writes nothing, so it is safe to call when an export dialog opens. Needs the export permission for that document type.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation AuthorizeExport($input: AuthorizeExportInput!) {
authorizeExport(input: $input) {
allowed
requireEncryption
}
}

Variables:

{
"input": {
"exportKey": "string"
}
}

Response:

{
"data": {
"authorizeExport": {
"allowed": true,
"requireEncryption": true
}
}
}
authorizeExport(
input: AuthorizeExportInput!
): AuthorizeExportResult!

Arguments​

authorizeExport.input ● AuthorizeExportInput! non-null input​

The export key that identifies the document type, and the label of the record being exported.

Type​

AuthorizeExportResult object​

Whether an export may go ahead.