Skip to content

Mail settings file

POST
/rest/core/documents/mail-settings
curl --request POST \
--url https://api.shypr.app/rest/core/documents/mail-settings \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <X-API-KEY>' \
--data '{ "documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "mailToCustomer": true, "mailToSupplier": true }'

Creates a File resource.

The new File resource

object
documentId
required
string format: uuid
mailToCustomer
required
boolean
mailToSupplier
required
boolean

Example generated

{
"documentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"mailToCustomer": true,
"mailToSupplier": true
}

File resource created

object
url
string
metadata
Array | null
scheduledDeletionAt

The stored object still has to go. RemoveFileHandler clears it, and the cron cleanup:scheduled-files tries again while it is set.

string | null format: date-time
customer
string | null format: iri-reference
supplier
string | null format: iri-reference
recordIri

The record that holds the file, for example “/invoices/”. A file on a note has the record of the note. AttachFileToEntity sets it.

string | null
mailToCustomer

The mail of a sales order attaches the file of each product on it. Off keeps the file internal. SendDocumentMailAction reads it.

boolean
mailToSupplier

The same for the mail of a purchase order.

boolean
deletable

Filled by FileNormalizer for the user who reads the file, see FileDeletePolicy.

boolean | null
storageType
string
Allowed values: app pub
name
string
path
string
mimeType
string
size
integer
type

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).

string
default: other
createdAt
string format: date-time
updatedAt
string | null format: date-time
id

More information

string format: uuid
uid
string
owner

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.

string | null format: iri-reference
visibility
string
default: workspace
Allowed values: workspace private
directory
string
downloadUrl
string
extension
string
sizeFmt
string
viewable
boolean
downloadable
boolean
storageRemoved
boolean
private
boolean
ownerName
string | null
ownerId
string | null

Example

{
"customer": "https://example.com/",
"supplier": "https://example.com/",
"mailToCustomer": false,
"mailToSupplier": false,
"storageType": "app",
"type": "other",
"owner": "https://example.com/",
"visibility": "workspace"
}

Invalid input

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

Forbidden

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

An error occurred

Unprocessable entity

object
status
integer
default: 422
violations
Array<object>
object
propertyPath
required

The property path of the violation

string
message
required

The message associated with the violation

string
code

The code of the violation

string
hint

An extra hint to understand the violation

string
payload

The serialized payload of the violation

object
key
additional properties
any
detail
string
type
string
title
string | null
instance
string | null

Example

{
"status": 422
}