POST
Send a sales order by email
Scope:
inventory:sales-orders.writehttps://api.holded.com/api/v2/sales-orders/{salesOrderId}/sendSends the sales order by email to the contact, with an optional custom subject and message; without them, the template configured in your account settings is used. Leave `emails` out to send it to the addresses on the document's contact, as the app's send dialog fills them in; if the contact has none, the request is refused.
Parameters
Path parameters
salesOrderId
stringrequiredSales Order ID (24-char hex ObjectId)
Request body
object
emails[]string[] | null
List of recipient email addresses. Leave it out to send to the email addresses on the document's contact; an empty list is refused.
subjectstring | null
Custom email subject line
messagestring | null
Custom email body message
mail_template_idstring | null
Identifier of the email template to use
cc[]string[] | null
List of CC email addresses
bcc[]string[] | null
List of BCC email addresses
Request
python
import requests
url = "https://api.holded.com/api/v2/sales-orders/{salesOrderId}/send"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"emails": [
"string"
],
"subject": "string",
"message": "string",
"mail_template_id": "string",
"cc": [
"string"
],
"bcc": [
"string"
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
200Sales order sentError responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Sales order not foundapplication/json