---
title: "Create Sales Order"
method: POST
path: "/v2/salesOrders"
tags: ["salesorder"]
---

# Create Sales Order

`POST /v2/salesOrders`

Create a new sales order

## Query parameters

- `renameSalesOrderNumberWhenAlreadyExists` boolean
- `disableAutomaticWorkflows` boolean

## Headers

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

## Request body

- JTLWawiRestContractsModelsV1SalesOrderCreateSalesOrder — Model Class: CreateSalesOrder
  - `number` string — The number of the sales order.
  - `externalNumber` string — The external number of the sales order.
  - `billingNumber` string — The number of the invoice.
  - `companyId` string, uuid — Represents a key for identifying a firm within the application.
  - `departureCountry` JTLWawiRestContractsModelsV1SalesOrderCreateDepartureCountry — Model Class: CreateDepartureCountry
    - `countryISO` string — ISO code of the departure country.
    - `state` string — Name of the state in the departure country.
    - `currencyIso` string — ISO code of the currency of the departure country.
    - `currencyFactor` number — The currency factor of the departure country.
  - `customerId` string, uuid — Represents a unique key for identifying a customer in the JTL system.
  - `customerVatID` string — The VAT ID of the customer.
  - `billingAddress` JTLWawiRestContractsModelsV1CommonCreateAddress — Model Class: CreateAddress
    - `company` string — Description of the Company.
    - `company2` string — Additional company information
    - `formOfAddress` string — Customer form of address
    - `title` string — Official title
    - `firstName` string — Customer first name
    - `lastName` string — Customer last name
    - `street` string — Street name in the customer's address
    - `address2` string — Additional address information
    - `postalCode` string — Postal code of the customer's address
    - `city` string — Name of city in the customer's address
    - `state` string — Name of state in the customer's address
    - `countryIso` string — Country ISO code
    - `vatID` string — Supplier VAT ID number
    - `phoneNumber` string — Landline phone number
    - `mobilePhoneNumber` string — Mobile phone number
    - `emailAddress` string — Email address
    - `fax` string — Fax number
  - `shipmentaddress` JTLWawiRestContractsModelsV1CommonCreateAddress — Model Class: CreateAddress
    - `company` string — Description of the Company.
    - `company2` string — Additional company information
    - `formOfAddress` string — Customer form of address
    - `title` string — Official title
    - `firstName` string — Customer first name
    - `lastName` string — Customer last name
    - `street` string — Street name in the customer's address
    - `address2` string — Additional address information
    - `postalCode` string — Postal code of the customer's address
    - `city` string — Name of city in the customer's address
    - `state` string — Name of state in the customer's address
    - `countryIso` string — Country ISO code
    - `vatID` string — Supplier VAT ID number
    - `phoneNumber` string — Landline phone number
    - `mobilePhoneNumber` string — Mobile phone number
    - `emailAddress` string — Email address
    - `fax` string — Fax number
  - `salesOrderDate` string, date-time — The date when the order was created.
  - `salesOrderPaymentDetails` JTLWawiRestContractsModelsV1SalesOrderCreateSalesOrderPaymentDetail — Model Class: CreateSalesOrderPaymentDetail
    - `paymentMethodId` string, uuid
    - `currencyIso` string — ISO code of the currency of the sales order.
    - `currencyFactor` number — The currency factor in the order at the time the order is created.
    - `paymentTarget` integer — The payment target of the sales order in days.
    - `cashDiscount` number — The cash discount of the sales order.
    - `cashDiscountDays` integer — The days that the cash discount is valid.
  - `salesOrderShippingDetail` JTLWawiRestContractsModelsV1SalesOrderCreateSalesOrderShippingDetail — Model Class: CreateSalesOrderShippingDetail
    - `shippingMethodId` string, uuid
    - `shippingPriority` integer — The shipping priority of the sales order.
    - `shippingDate` string, date-time — The notified shipping date of the sales order.
    - `estimatedDeliveryDate` string, date-time — The estimated delivery date of the sales order.
    - `onHoldReasonId` string, uuid
    - `extraWeight` number — The extra weight added to the sales order.
  - `colorcodeId` string, uuid — Represents a key for identifying a color entity in the system.
  - `comment` string — A comment on the sales order.
  - `customerComment` string — A customer comment on the sales order.
  - `languageIso` string — The language of the order.

## Response `201`

The created sales order.

- JTLWawiRestContractsModelsV1SalesOrderSalesOrder — Model Class: SalesOrder
  - `id` string, uuid
  - `number` string — The number of the sales order.
  - `externalNumber` string — The external number of the sales order.
  - `billingNumber` string — The number of the invoice.
  - `companyId` string, uuid — Represents a key for identifying a firm within the application.
  - `departureCountry` JTLWawiRestContractsModelsV1SalesOrderDepartureCountry — Model Class: DepartureCountry
    - `countryISO` string — ISO code of the departure country.
    - `state` string — Name of the state in the departure country.
    - `currencyIso` string — ISO code of the currency of the departure country.
    - `currencyFactor` number — The currency factor of the departure country.
  - `customerId` string, uuid — Represents a unique key for identifying a customer in the JTL system.
  - `customerVatID` string — The VAT ID of the customer.
  - `merchantVatID` string — The VAT ID of the merchant.
  - `billingAddress` JTLWawiRestContractsModelsV1CommonAddress — Model Class: Address
    - `id` string, uuid
    - `company` string — Description of the Company.
    - `company2` string — Additional company information
    - `formOfAddress` string — Customer form of address
    - `title` string — Official title
    - `firstName` string — Customer first name
    - `lastName` string — Customer last name
    - `street` string — Street name in the customer's address
    - `address2` string — Additional address information
    - `postalCode` string — Postal code of the customer's address
    - `city` string — Name of city in the customer's address
    - `state` string — Name of state in the customer's address
    - `countryIso` string — Country ISO code
    - `vatID` string — Supplier VAT ID number
    - `phoneNumber` string — Landline phone number
    - `mobilePhoneNumber` string — Mobile phone number
    - `emailAddress` string — Email address
    - `fax` string — Fax number
  - `shipmentaddress` JTLWawiRestContractsModelsV1CommonAddress — Model Class: Address
    - `id` string, uuid
    - `company` string — Description of the Company.
    - `company2` string — Additional company information
    - `formOfAddress` string — Customer form of address
    - `title` string — Official title
    - `firstName` string — Customer first name
    - `lastName` string — Customer last name
    - `street` string — Street name in the customer's address
    - `address2` string — Additional address information
    - `postalCode` string — Postal code of the customer's address
    - `city` string — Name of city in the customer's address
    - `state` string — Name of state in the customer's address
    - `countryIso` string — Country ISO code
    - `vatID` string — Supplier VAT ID number
    - `phoneNumber` string — Landline phone number
    - `mobilePhoneNumber` string — Mobile phone number
    - `emailAddress` string — Email address
    - `fax` string — Fax number
  - `salesOrderDate` string, date-time — The date when the order was created.
  - `salesOrderPaymentDetails` JTLWawiRestContractsModelsV1SalesOrderSalesOrderPaymentDetail — Model Class: SalesOrderPaymentDetail
    - `paymentMethodId` string, uuid
    - `paymentStatus` 0 | 1 | 2 — 0 = UnPayed, 1 = PartialPayed, 2 = Payed
    - `totalGrossAmount` number — The total gross amount of the sales order.
    - `currencyIso` string — ISO code of the currency of the sales order.
    - `currencyFactor` number — The currency factor in the order at the time the order is created.
    - `dateOfPayment` string, date-time — Date of payment that paid off the sales order.
    - `stillToPay` number — The amount that is left to pay for this sales order.
    - `paymentTarget` integer — The payment target of the sales order in days.
    - `cashDiscount` number — The cash discount of the sales order.
    - `cashDiscountDays` integer — The days that the cash discount is valid.
  - `salesOrderShippingDetail` JTLWawiRestContractsModelsV1SalesOrderSalesOrderShippingDetail — Model Class: SalesOrderShippingDetail
    - `shippingMethodId` string, uuid
    - `deliveryCompleteStatus` 0 | 1 | 2 — 0 = DeliveryNotComplete, 1 = DeliveryComplete, 2 = DeliveryCompleteWithoutNote
    - `shippingPriority` integer — The shipping priority of the sales order.
    - `shippingDate` string, date-time — The notified shipping date of the sales order.
    - `estimatedDeliveryDate` string, date-time — The estimated delivery date of the sales order.
    - `deliveredDate` string, date-time — The date when the sales order was delivered.
    - `onHoldReasonId` string, uuid
    - `extraWeight` number — The extra weight added to the sales order.
  - `colorcodeId` string, uuid — Represents a key for identifying a color entity in the system.
  - `isExternalInvoice` boolean — Indicates if the invoice of the order was created in an external system, like Amazon VCS.
  - `comment` string — A comment on the sales order.
  - `customerComment` string — A customer comment on the sales order.
  - `isCancelled` boolean — Indicates if the order has been cancelled. There is a special endpoint for cancelling sales orders.
  - `languageIso` string — The language of the order.
  - `cancellationDetails` JTLWawiRestContractsModelsV1SalesOrderSalesOrderCancellationDetails — Model Class: SalesOrderCancellationDetails
    - `cancellationReasonId` string, uuid
    - `cancellationComment` string — A comment that adds further information to the cancellation.
    - `date` string, date-time — The DateTime of Cancellation.
  - `salesChannelId` string — The sales channel of the sales order.
  - `userCreatedId` string, uuid
  - `userId` string, uuid
  - `transactionStatusId` string, uuid

## 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.net/jtl-software/apis/scx-authentication-api.md) · [All operations](https://skmtc.net/jtl-software/apis/scx-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jtl-software/scx-authentication-api/versions/f979b1ea6951/schema)
