---
title: "Mail Sales Order"
method: POST
path: "/v2/salesOrders/{salesOrderId}/output/mail"
tags: ["salesorder"]
---

# Mail Sales Order

`POST /v2/salesOrders/{salesOrderId}/output/mail`

## Request

- Base URL: `https://scx-sbx.api.jtl-software.com`
- URL: `https://scx-sbx.api.jtl-software.com/v2/salesOrders/{salesOrderId}/output/mail`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://auth.jtl-cloud.com/oauth2/auth`
    - Token URL: `https://auth.jtl-cloud.com/oauth2/token` scopes: `salesorders.read`
  - OAuth 2
    - Client credentials
    - Token URL: `https://auth.jtl-cloud.com/oauth2/token` scopes: `salesorders.read`
- TypeScript: <https://skmtc.dev/jtl-software/apis/scx-authentication-api/docs/v2/salesOrders/:salesOrderId/output/mail/post.ts> (a function with typed inputs; its response is checked against the schema)

Execute the mailing of a SalesOrder

## Path parameters

- `salesOrderId` string, uuid, required

## Query parameters

- `formId` string, uuid: Represents a unique key for identifying a form (Formular) entity within the system.

## Headers

- `x-tenant-id` string, uuid, required
- `x-runas` string
- `x-companyid` string

## Response `201`

The Mailjob is created

## Other responses

- `400`: The sent data is invalid.
- `401`
- `402`: No licence available or the app has not been authorised by JTL.

---

[API](https://skmtc.dev/jtl-software/apis/scx-authentication-api.md) - [All operations](https://skmtc.dev/jtl-software/apis/scx-authentication-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jtl-software/apis/scx-authentication-api/revisions/f979b1ea6951?raw)
