Multi delete file
const url = 'https://api.shypr.app/rest/core/documents/multi-delete';const options = { method: 'POST', headers: {'X-API-KEY': '<X-API-KEY>', 'Content-Type': 'application/json'}, body: '{"documents":[{"documentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shypr.app/rest/core/documents/multi-delete \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <X-API-KEY>' \ --data '{ "documents": [ { "documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'Creates a File resource.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The new File resource
object
object
Example generated
{ "documents": [ { "documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ]}object
object
Responses
Section titled “Responses”File resource created
object
The stored object still has to go. RemoveFileHandler clears it, and the cron cleanup:scheduled-files tries again while it is set.
The record that holds the file, for example “/invoices/
The mail of a sales order attaches the file of each product on it. Off keeps the file internal. SendDocumentMailAction reads it.
The same for the mail of a purchase order.
Filled by FileNormalizer for the user who reads the file, see FileDeletePolicy.
TYPE_UPLOAD for a file that a user uploads. A file that the application makes gets the key of its UploadConfig (invoice, export, …) or a type of its own (drawing, label).
Null for a row that the application made. The relation has the e-mail and the roles of the user, so only a manager reads it. Each user who sees the row reads ownerName and ownerId.
Example
{ "customer": "https://example.com/", "supplier": "https://example.com/", "mailToCustomer": false, "mailToSupplier": false, "storageType": "app", "type": "other", "owner": "https://example.com/", "visibility": "workspace"}object
The stored object still has to go. RemoveFileHandler clears it, and the cron cleanup:scheduled-files tries again while it is set.
Example
https://example.com/Example
https://example.com/The record that holds the file, for example “/invoices/
The mail of a sales order attaches the file of each product on it. Off keeps the file internal. SendDocumentMailAction reads it.
The same for the mail of a purchase order.
Filled by FileNormalizer for the user who reads the file, see FileDeletePolicy.
TYPE_UPLOAD for a file that a user uploads. A file that the application makes gets the key of its UploadConfig (invoice, export, …) or a type of its own (drawing, label).
Null for a row that the application made. The relation has the e-mail and the roles of the user, so only a manager reads it. Each user who sees the row reads ownerName and ownerId.
Example
https://example.com/Invalid input
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}Forbidden
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}An error occurred
Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}