> For the complete documentation index, see [llms.txt](https://docs.xorosoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xorosoft.com/developers-api/third-party-logistics-3pl/create-sales-order.md).

# Create Sales Order

Creates a new sales order in the system corresponding to the provided 3PL account token.

| Name                              | Data Type           | Description                                                                                                                                                                                      |
| --------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `AccountToken`                    | string              | A unique authentication token generated specifically for a 3PL account. It is used as a parameter in API requests to authenticate and access resources related to the corresponding 3PL account. |
| `ThirdPartyRefNo`                 | string, required    | A reference number for the order. If an order in Xorosoft ERP exists with the same ThirdPartyRefNo, it will be detected as a duplicate and will not be created.                                  |
| `ThirdPartySource`                | string              | If the order came from a third party platform, it can be indicated here.                                                                                                                         |
| `ThirdPartyIconUrl`               | string              | Use a URL that ends with .png or .jpg for an image of the third party source.For example, a Joor order would have a Joor icon.                                                                   |
| `ThirdPartyDisplayName`           | string              | It represents the name of third party source.                                                                                                                                                    |
| `CheckThirdPartySource`           | bool                | Property, when set to true, checks if a third-party reference number exists with the same third-party source                                                                                     |
| `SaleStoreName`                   | string, required    | It is Sale Store's (inventory set) name here exactly as it is in Xorosoft ERP.                                                                                                                   |
| `StoreName`                       | string              | It is Ship Store's (inventory set) name here exactly as it is in Xorosoft ERP. If this is left blank, then \*\*SaleStoreName will be used.                                                       |
| `CurrencyCode`                    | string, required    | It represents the currency for the order. This must match with the customer's currency. Choose from: USD,CAD,EUR,AUD.                                                                            |
| `CustomerName`                    | string, required    | It represents the name of customer.                                                                                                                                                              |
| `CustomerFirstName`               | string              | First Name of the customer.                                                                                                                                                                      |
| `CustomerLastName`                | string              | Last Name of the customer.                                                                                                                                                                       |
| `CustomerMainPhone`               | string              | Customer main Phone Number                                                                                                                                                                       |
| `CustomerEmailMain`               | string              | The customer's email address.                                                                                                                                                                    |
| `CustomerPO`                      | string              | Customer PO field.                                                                                                                                                                               |
| `OrderDate`                       | DateTime, required  | The date the order was placed.                                                                                                                                                                   |
| `DateToBeShipped`                 | DateTime, required  | The date the order is to be shipped before or on.                                                                                                                                                |
| `LastDateToBeShipped`             | DateTime            | The date the order should be shipped.                                                                                                                                                            |
| `DateToBeCancelled`               | DateTime            | If the order hasn't been fulfilled by this date, then it can be cancelled, MM-DD-YYYY                                                                                                            |
| `OrderClassCode`                  | string              | It represents the Code categorize your orders.                                                                                                                                                   |
| `OrderClassName`                  | string              | It represents the name of the Class to categorize your orders.                                                                                                                                   |
| `OrderTypeCode`                   | string              | It represents the code for type of order.                                                                                                                                                        |
| `OrderTypeName`                   | string              | It represents the name for type of order.                                                                                                                                                        |
| `ExchangeRate`                    | double, required    | It represents the exchange rate betweeen currencies. If currency is the same as home currency, then put 1 here. Otherwise put the exchange rate for the order.                                   |
| `Memo`                            | string              | A memo for the order can be entered here.                                                                                                                                                        |
| `PaymentTermsName`                | string              | It is a payment term from the system for this order. This must match up exactly to a Payment Term in Xorosoft ERP.                                                                               |
| `PaymentTermsType`                | string              | It represents the code for type of payment terms.                                                                                                                                                |
| `RefNo`                           | string              | It is a reference number for the order here. This can be an internal reference number, as opposed to a third-party reference number.                                                             |
| `Tags`                            | string              | It represents tags here for the order and multiple tags can be separated by a comma.                                                                                                             |
| `SalesRepId`                      | string              | Please refer to the User Centre in your Xorosoft ERP system and enter the UserID of the sales rep for this Sales Order.                                                                          |
| `ShipMethodName`                  | string              | It is a ship method for the order here. Choose from: Pick Up, Delivery(Own Truck) and Delivery(Third Party)                                                                                      |
| `CarrierName`                     | string              | If ShipMethodName is not Pick Up, then enter a carrier.                                                                                                                                          |
| `CarrierCode`                     | string              | The code for the carrier that is to be used(or was used) when this order is shipped(was shipped).                                                                                                |
| `ShipServiceName`                 | string              | It represents the name of ship service for the order.                                                                                                                                            |
| `ShipServiceCode`                 | string              | The code for the shipping service that is to be used(or was used) when this order is shipped(was shipped).                                                                                       |
| `FobName`                         | string              | It represents the FobName for the order.                                                                                                                                                         |
| `IsOrderTaxExempt`                | bool                | It represents the boolean represented in the form of N for Exempt tax and Y for Active Tax.                                                                                                      |
| `ShippingTaxItemCode1`            | string              | It represents the ShippingTaxItemCode1 for the Order.                                                                                                                                            |
| `ShippingTaxItemValue1`           | double              | It represents the ShippingTaxItemValue1 for the Order.                                                                                                                                           |
| `ShippingTaxItemCode2`            | string              | It represents the ShippingTaxItemCode2 for the Order.                                                                                                                                            |
| `ShippingTaxItemValue2`           | double              | It represents the ShippingTaxItemValue2 for the Order.                                                                                                                                           |
| `ShippingTaxItemCode3`            | string              | It represents the ShippingTaxItemCode3 for the Order.                                                                                                                                            |
| `ShippingTaxItemValue3`           | double              | It represents the ShippingTaxItemValue3 for the Order.                                                                                                                                           |
| `ShippingTaxItemCode4`            | string              | It represents the ShippingTaxItemCode4 for the Order.                                                                                                                                            |
| `ShippingTaxItemValue4`           | double              | It represents the ShippingTaxItemValue5 for the Order.                                                                                                                                           |
| `ShippingTermsName`               | string              | It represents the shipping terms.Choose from: Prepaid, Collect, Prepaid& Billed, Collect& Allowed and Third Party Billing.                                                                       |
| `ShippingAccountNumber`           | string              | It represents the shipping account number here.                                                                                                                                                  |
| `ShippingCost`                    | double              | It represents the shipping cost for the Order.                                                                                                                                                   |
| `ShippingNotes`                   | string              | It represents the shipping notes for the Order.                                                                                                                                                  |
| `ShipToFirstName`                 | string              | It represents the first name of ship to for the Order.                                                                                                                                           |
| `ShipToLastName`                  | string              | It represents the last name of ship to for the Order.                                                                                                                                            |
| `ShipToName`                      | string              | It represents the Main address name of ship to for the Order.                                                                                                                                    |
| `ShipToCompanyName`               | string              | It represents the company name of ship to for the Order.                                                                                                                                         |
| `ShipToAddr`                      | string              | It represents the address line 1 of ship to for the Order.                                                                                                                                       |
| `ShipToAddr2`                     | string              | It represents the address line 2 of ship to for the Order.                                                                                                                                       |
| `ShipToCity`                      | string              | It represents the city of ship to for the Order.                                                                                                                                                 |
| `ShipToCountry`                   | string              | It represents the country name of ship to for the Order.                                                                                                                                         |
| `ShipToCountryISO2`               | string              | It is a code to Identify a Country of ship to for the Order                                                                                                                                      |
| `ShipToState`                     | string              | It represents the state name of ship to for the Order.                                                                                                                                           |
| `ShipToStateAbbr`                 | string              | It is the abbrevation of state of ship to for the Order.                                                                                                                                         |
| `ShipToZpCode`                    | string              | It represents the zip code of ship to for the Order.                                                                                                                                             |
| `ShipToPhoneNumber`               | string              | It represents the phone number of ship to for the Order.                                                                                                                                         |
| `ShipToEmail`                     | string              | It represents the email of ship to for the Order.                                                                                                                                                |
| `BuyerName`                       | string              | It is a name of Buyer.                                                                                                                                                                           |
| `BillToFirstName`                 | string              | It represents the first name of bill to for the Order.                                                                                                                                           |
| `BillToLastName`                  | string              | It represents the last name of bill to for the Order.                                                                                                                                            |
| `BillToName`                      | string              | It represents the Main address name of bill to for the Order.                                                                                                                                    |
| `BillToAddr`                      | string              | It represents the address line 1 of bill to for the Order.                                                                                                                                       |
| `BillToAddr2`                     | string              | It represents the address line 2 of bill to for the Order.                                                                                                                                       |
| `BillToCity`                      | string              | It represents the city of bill to for the Order.                                                                                                                                                 |
| `BillToCountry`                   | string              | It represents the country name of bill to for the Order.                                                                                                                                         |
| `BillToCountryISO2`               | string              | It is a code to Identify a Country of bill to for the Order                                                                                                                                      |
| `BillToState`                     | string              | It represents the state name of bill to for the Order.                                                                                                                                           |
| `BillToStateAbbr`                 | string              | It is the abbrevation of state name of bill to for the Order.                                                                                                                                    |
| `BillToZpCode`                    | string              | It represents the zip code of bill to for the Order.                                                                                                                                             |
| `BillToCompanyName`               | string              | It represents the company name of bill to for the Order.                                                                                                                                         |
| `BillToPhoneNumber`               | string              | It represents the phone number of bill to for the Order.                                                                                                                                         |
| `BillToEmail`                     | string              | It represents the email of bill to for the Order.                                                                                                                                                |
| `CustomerGroupName`               | string              | It represents the customer group name for the Order.                                                                                                                                             |
| `DepositRequiredTypeName`         | string              | It represents the deposit on the order, whether that deposit is Amount or a Percentage.                                                                                                          |
| `DepositRequiredAmount`           | double              | It is percentage or amount of deposit required for this order.                                                                                                                                   |
| `DepositAmount`                   | double              | It represents the deposit amount for the Deposit.                                                                                                                                                |
| `DepositAccountName`              | string              | It represents the deposit account name for the Account.                                                                                                                                          |
| `LiabilityAccountName`            | string              | It represents the liability account name for the Account.                                                                                                                                        |
| `PaymentMethodName`               | string              | It represents the payment method name for the Method.                                                                                                                                            |
| `AutoDepositTotalAmount`          | string              | It represents the auto deposit total amount for the Total.                                                                                                                                       |
| `CustomerServiceRepId`            | string              | It represents the customer service representative id.                                                                                                                                            |
| `ThirdPartyTotalAmount`           | double              | It represents the third party total amount.                                                                                                                                                      |
| `CustomFieldH1`                   | string              | Custom Fields (CustomFieldH1 - CustomFieldH30).                                                                                                                                                  |
| `ItemNumber`                      | string, required    | The item's (SKU) number. This property is unique to this item, another item cannot be created with the same Item Number.                                                                         |
| `ItemUpc`                         | string              | The item's UPC code.                                                                                                                                                                             |
| `ItemBrand`                       | string              | The item's Brand.                                                                                                                                                                                |
| `Description`                     | string              | The item's description.                                                                                                                                                                          |
| `UnitPrice`                       | double, required    | The item's Unit Price.                                                                                                                                                                           |
| `Qty`                             | double, required    | The item's Qty.                                                                                                                                                                                  |
| `Discount`                        | double              | The item's Discount.                                                                                                                                                                             |
| `DiscountTypeName`                | string              | Percentage or Amount.                                                                                                                                                                            |
| `SellUomName`                     | string              | Selling unit of measurement of the item                                                                                                                                                          |
| `ItemNotes`                       | string              | It represents the item notes for the Item.                                                                                                                                                       |
| `TaxItemCode1`                    | string              | It represents the TaxItemCode1 for the Item.                                                                                                                                                     |
| `TaxItemValue1`                   | double              | It represents the TaxItemValue1 for the Item.                                                                                                                                                    |
| `TaxItemCode2`                    | string              | It represents the TaxItemCode2 for the Item.                                                                                                                                                     |
| `TaxItemValue2`                   | double              | It represents the TaxItemValue2 for the Item.                                                                                                                                                    |
| `TaxItemCode3`                    | string              | It represents the TaxItemCode3 for the Item.                                                                                                                                                     |
| `TaxItemValue3`                   | double              | It represents the TaxItemValue3 for the Item.                                                                                                                                                    |
| `TaxItemCode4`                    | string              | It represents the TaxItemCode4 for the Item.                                                                                                                                                     |
| `TaxItemValue4`                   | double              | It represents the TaxItemValue4 for the Item.                                                                                                                                                    |
| `ItemCategoryName`                | string              | It represents the name of item category here.                                                                                                                                                    |
| `ItemGroupName`                   | string              | It represents the name of item group here.                                                                                                                                                       |
| `ItemShippingCost`                | double              | It represents the item shipping cost.                                                                                                                                                            |
| `ItemShippingTaxItemCode1`        | string              | It represents the ItemShippingTaxItemCode1.                                                                                                                                                      |
| `ItemShippingTaxItemValue1`       | double              | It represents the ItemShippingTaxItemValue1.                                                                                                                                                     |
| `ItemShippingTaxItemCode2`        | string              | It represents the ItemShippingTaxItemCode2.                                                                                                                                                      |
| `ItemShippingTaxItemValue2`       | double              | It represents the ItemShippingTaxItemValue2.                                                                                                                                                     |
| `ItemShippingTaxItemCode3`        | string              | It represents the ItemShippingTaxItemCode3.                                                                                                                                                      |
| `ItemShippingTaxItemValue3`       | double              | It represents the ItemShippingTaxItemValue3.                                                                                                                                                     |
| `ItemShippingTaxItemCode4`        | string              | It represents the ItemShippingTaxItemCode4.                                                                                                                                                      |
| `ItemShippingTaxItemValue4`       | double              | It represents the ItemShippingTaxItemValue4.                                                                                                                                                     |
| `BaseUomCode`                     | string              | It represents the code for base value of unit of measurement.                                                                                                                                    |
| `SellUomCode`                     | string              | It represents the code for unit of measurement used for selling.                                                                                                                                 |
| `VASItemName`                     | string              | Value added service name.                                                                                                                                                                        |
| `VASItemCost`                     | double              | Value added service item cost.                                                                                                                                                                   |
| `AutoReleaseSalesOrder`           | bool                | This will auto release the sales order while creating sales order.                                                                                                                               |
| `CustomFieldD1`                   | string              | Custom Fields (CustomFieldD1 - CustomFieldD30).                                                                                                                                                  |
| `AccountCode3PL`                  | string              | The code associated with the 3PL account.                                                                                                                                                        |
| `RequirePackAndHold`              | bool                | Indicates whether packing and holding of items are required for the order.                                                                                                                       |
| `IsPackAndHold`                   | bool                | Indicates whether the order is packed and held.                                                                                                                                                  |
| `SoBatchId`                       | int (nullable)      | The ID of the sales order batch.                                                                                                                                                                 |
| `PackingSlipNumbers`              | string              | The numbers associated with the packing slips for the order.                                                                                                                                     |
| `TotalCancelQty`                  | double              | The total quantity of canceled items.                                                                                                                                                            |
| `Customer3plTypeName`             | string              | The type name of the customer associated with the 3PL account.                                                                                                                                   |
| `IsVASRequired`                   | bool                | Indicates whether Value-Added Services (VAS) are required for the order.                                                                                                                         |
| `VASInstruction`                  | string              | Instructions for Value-Added Services (VAS) associated with the order.                                                                                                                           |
| `IsVASCompleted`                  | bool                | Indicates whether Value-Added Services (VAS) for the order are completed.                                                                                                                        |
| `ExceptionFlag`                   | bool                | Indicates if there is an exception related to the order.                                                                                                                                         |
| `SoBatchNumber`                   | string              | The batch number associated with the sales order.                                                                                                                                                |
| `PackedDttm`                      | DateTime (nullable) | The date and time when the order was packed.                                                                                                                                                     |
| `ReadyToShipDttm`                 | DateTime (nullable) | The date and time when the order is ready to be shipped.                                                                                                                                         |
| `StagedDttm`                      | DateTime (nullable) | The date and time when the order is staged.                                                                                                                                                      |
| `IsLeadOrder`                     | bool                | Indicates whether the order is a lead order.                                                                                                                                                     |
| `IsPackAndHoldReleased`           | bool                | Indicates whether the packed and held items are released.                                                                                                                                        |
| `CustomerAccountNumber`           | string              | The account number of the customer associated with the 3PL account.                                                                                                                              |
| `ShipToAddrHashCode`              | int                 | The hash code of the shipping address.                                                                                                                                                           |
| `Account3plId`                    | int                 | The ID of the 3PL account.                                                                                                                                                                       |
| `MinimumATSPercent`               | double              | The minimum Available-to-Sell (ATS) percentage.                                                                                                                                                  |
| `LockFlag`                        | bool                | Indicates if the order is locked.                                                                                                                                                                |
| `FillRateFailedFlag`              | bool                | Indicates if the fill rate for the order failed.                                                                                                                                                 |
| `Account3plName`                  | string              | The name of the 3PL account.                                                                                                                                                                     |
| `EIN`                             | string              | The EIN associated with the account.                                                                                                                                                             |
| `DutyPaymentTermsId`              | int (nullable)      | The ID of the duty payment terms.                                                                                                                                                                |
| `DutyPaymentTermsCode`            | string              | The code for the duty payment terms.                                                                                                                                                             |
| `DutyPaymentTerms`                | string              | The duty payment terms.                                                                                                                                                                          |
| `CustomComment`                   | string              | Custom comments associated with the order.                                                                                                                                                       |
| `PriorityCode`                    | string              | The priority code associated with the order.                                                                                                                                                     |
| `IsAccount3plApiRequest`          | bool                | Indicates if the request is made through the 3PL API.                                                                                                                                            |
| `CustomFieldD1`                   | string              | Custom Fields (CustomFieldD1 - CustomFieldD30).                                                                                                                                                  |
| `CustomerDefaultOrderTypeName`    | string              | The default order type associated with the customer.                                                                                                                                             |
| `CustomerDefaultProjectClassName` | string              | The default project class linked to the customer.                                                                                                                                                |
| `IsCustomerTaxExempt`             | bool                | Indicates whether the customer is tax-exempt (`true` or `false`).                                                                                                                                |
| `CustomerTaxNumber1`              | string              | It represents the primary tax identification number of the customer.                                                                                                                             |
| `CustomerTaxNumber2`              | string              | It represents the secondary tax identification number of the customer (if applicable).                                                                                                           |
| `CustomerTags`                    | string              | Tags or labels associated with the customer for categorization or reporting purposes.                                                                                                            |

```json
{"openapi":"3.0.3","info":{"title":"Xorosoft ERP Public API","version":"2026.07"},"tags":[{"name":"Third-Party Logistics (3PL)","description":"Use 3PL APIs when a warehouse or logistics provider needs account-specific access to customer orders, inventory, purchase orders, RMAs, bills, item receipts, packing slips, and related documents. 3PL requests use the 3PL account token generated in Xorosoft ERP so data access can be limited to the connected client account."}],"servers":[{"url":"https://res.xorosoft.io","description":"Xorosoft ERP API server"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"scheme":"basic","type":"http"}},"schemas":{"PostAccount3plCreatesalesorderRequest":{"type":"object","description":"Request body for Create Sales Order.","properties":{"AccountToken":{"type":"string","description":"A unique authentication token generated specifically for a 3PL account. It is used as a parameter in API requests to authenticate and access resources related to the corresponding 3PL account."},"ThirdPartyRefNo":{"type":"string","description":"A reference number for the order. If an order in Xorosoft ERP exists with the same ThirdPartyRefNo, it will be detected as a duplicate and will not be created."},"ThirdPartySource":{"type":"string","description":"If the order came from a third party platform, it can be indicated here."},"ThirdPartyIconUrl":{"type":"string","description":"Use a URL that ends with .png or .jpg for an image of the third party source.For example, a Joor order would have a Joor icon."},"ThirdPartyDisplayName":{"type":"string","description":"It represents the name of third party source."},"CheckThirdPartySource":{"type":"boolean","description":"Property, when set to true, checks if a third-party reference number exists with the same third-party source"},"SaleStoreName":{"type":"string","description":"It is Sale Store's (inventory set) name here exactly as it is in Xorosoft ERP."},"StoreName":{"type":"string","description":"It is Ship Store's (inventory set) name here exactly as it is in Xorosoft ERP. If this is left blank, then **SaleStoreName will be used."},"CurrencyCode":{"type":"string","description":"It represents the currency for the order. This must match with the customer's currency. Choose from: USD,CAD,EUR,AUD."},"CustomerName":{"type":"string","description":"It represents the name of customer."},"CustomerFirstName":{"type":"string","description":"First Name of the customer."},"CustomerLastName":{"type":"string","description":"Last Name of the customer."},"CustomerMainPhone":{"type":"string","description":"Customer main Phone Number"},"CustomerEmailMain":{"type":"string","description":"The customer's email address."},"CustomerPO":{"type":"string","description":"Customer PO field."},"OrderDate":{"type":"string","description":"The date the order was placed.","format":"date-time"},"DateToBeShipped":{"type":"string","description":"The date the order is to be shipped before or on.","format":"date-time"},"LastDateToBeShipped":{"type":"string","description":"The date the order should be shipped.","format":"date-time"},"DateToBeCancelled":{"type":"string","description":"If the order hasn't been fulfilled by this date, then it can be  cancelled, MM-DD-YYYY","format":"date-time"},"OrderClassCode":{"type":"string","description":"It represents the Code categorize your orders."},"OrderClassName":{"type":"string","description":"It represents the name of the Class to categorize your orders."},"OrderTypeCode":{"type":"string","description":"It represents the code for type of order."},"OrderTypeName":{"type":"string","description":"It represents the name for type of order."},"ExchangeRate":{"type":"number","description":"It represents the exchange rate betweeen currencies. If currency is the same as home currency, then put 1 here. Otherwise put the exchange rate for the order."},"Memo":{"type":"string","description":"A memo for the order can be entered here."},"PaymentTermsName":{"type":"string","description":"It is a payment term from the system for this order. This must match up exactly to a Payment Term in Xorosoft ERP."},"PaymentTermsType":{"type":"string","description":"It represents the code for type of payment terms."},"RefNo":{"type":"string","description":"It is a reference number for the order here. This can be an internal reference number, as opposed to a third-party reference number."},"Tags":{"type":"string","description":"It represents tags here for the order and multiple tags can be separated by a comma."},"SalesRepId":{"type":"string","description":"Please refer to the User Centre in your Xorosoft ERP system and enter the UserID of the sales rep for this Sales Order."},"ShipMethodName":{"type":"string","description":"It is a ship method for the order here. Choose from: Pick Up, Delivery(Own Truck) and Delivery(Third Party)"},"CarrierName":{"type":"string","description":"If ShipMethodName is not Pick Up, then enter a carrier."},"CarrierCode":{"type":"string","description":"The code for the carrier that is to be used(or was used) when this order is shipped(was shipped)."},"ShipServiceName":{"type":"string","description":"It represents the name of ship service for the order."},"ShipServiceCode":{"type":"string","description":"The code for the shipping service that is to be used(or was used) when this order is shipped(was shipped)."},"FobName":{"type":"string","description":"It represents the FobName for the order."},"IsOrderTaxExempt":{"type":"boolean","description":"It represents the boolean represented in the form of N for Exempt tax and Y for Active Tax."},"ShippingTaxItemCode1":{"type":"string","description":"It represents the ShippingTaxItemCode1 for the Order."},"ShippingTaxItemValue1":{"type":"number","description":"It represents the ShippingTaxItemValue1 for the Order."},"ShippingTaxItemCode2":{"type":"string","description":"It represents the ShippingTaxItemCode2 for the Order."},"ShippingTaxItemValue2":{"type":"number","description":"It represents the ShippingTaxItemValue2 for the Order."},"ShippingTaxItemCode3":{"type":"string","description":"It represents the ShippingTaxItemCode3 for the Order."},"ShippingTaxItemValue3":{"type":"number","description":"It represents the ShippingTaxItemValue3 for the Order."},"ShippingTaxItemCode4":{"type":"string","description":"It represents the ShippingTaxItemCode4 for the Order."},"ShippingTaxItemValue4":{"type":"number","description":"It represents the ShippingTaxItemValue5 for the Order."},"ShippingTermsName":{"type":"string","description":"It represents the shipping terms.Choose from: Prepaid, Collect, Prepaid& Billed, Collect& Allowed and Third Party Billing."},"ShippingAccountNumber":{"type":"string","description":"It represents the shipping account number here."},"ShippingCost":{"type":"number","description":"It represents the shipping cost for the Order."},"ShippingNotes":{"type":"string","description":"It represents the shipping notes for the Order."},"ShipToFirstName":{"type":"string","description":"It represents the first name of ship to for the Order."},"ShipToLastName":{"type":"string","description":"It represents the last name of ship to for the Order."},"ShipToName":{"type":"string","description":"It represents the Main address name of ship to for the Order."},"ShipToCompanyName":{"type":"string","description":"It represents the company name of ship to for the Order."},"ShipToAddr":{"type":"string","description":"It represents the address line 1 of ship to for the Order."},"ShipToAddr2":{"type":"string","description":"It represents the address line 2 of ship to for the Order."},"ShipToCity":{"type":"string","description":"It represents the city of ship to for the Order."},"ShipToCountry":{"type":"string","description":"It represents the country name of ship to for the Order."},"ShipToCountryISO2":{"type":"string","description":"It is a code to Identify a Country of ship to for the Order"},"ShipToState":{"type":"string","description":"It represents the state name of ship to for the Order."},"ShipToStateAbbr":{"type":"string","description":"It is the abbrevation of state of ship to for the Order."},"ShipToZpCode":{"type":"string","description":"It represents the zip code of ship to for the Order."},"ShipToPhoneNumber":{"type":"string","description":"It represents the phone number of ship to for the Order."},"ShipToEmail":{"type":"string","description":"It represents the email of ship to for the Order."},"BuyerName":{"type":"string","description":"It is a name of Buyer."},"BillToFirstName":{"type":"string","description":"It represents the first name of bill to for the Order."},"BillToLastName":{"type":"string","description":"It represents the last name of bill to for the Order."},"BillToName":{"type":"string","description":"It represents the Main address name of bill to for the Order."},"BillToAddr":{"type":"string","description":"It represents the address line 1 of bill to for the Order."},"BillToAddr2":{"type":"string","description":"It represents the address line 2 of bill to for the Order."},"BillToCity":{"type":"string","description":"It represents the city of bill to for the Order."},"BillToCountry":{"type":"string","description":"It represents the country name of bill to for the Order."},"BillToCountryISO2":{"type":"string","description":"It is a code to Identify a Country of bill to for the Order"},"BillToState":{"type":"string","description":"It represents the state name of bill to for the Order."},"BillToStateAbbr":{"type":"string","description":"It is the abbrevation of state name of bill to for the Order."},"BillToZpCode":{"type":"string","description":"It represents the zip code of bill to for the Order."},"BillToCompanyName":{"type":"string","description":"It represents the company name of bill to for the Order."},"BillToPhoneNumber":{"type":"string","description":"It represents the phone number of bill to for the Order."},"BillToEmail":{"type":"string","description":"It represents the email of bill to for the Order."},"CustomerGroupName":{"type":"string","description":"It represents the customer group name for the Order."},"DepositRequiredTypeName":{"type":"string","description":"It represents the deposit on the order, whether that deposit is Amount or a Percentage."},"DepositRequiredAmount":{"type":"number","description":"It is percentage or amount of deposit required for this order."},"DepositAmount":{"type":"number","description":"It represents the deposit amount for the Deposit."},"DepositAccountName":{"type":"string","description":"It represents the deposit account name for the Account."},"LiabilityAccountName":{"type":"string","description":"It represents the liability account name for the Account."},"PaymentMethodName":{"type":"string","description":"It represents the payment method name for the Method."},"AutoDepositTotalAmount":{"type":"string","description":"It represents the auto deposit total amount for the Total."},"CustomerServiceRepId":{"type":"string","description":"It represents the customer service representative id."},"ThirdPartyTotalAmount":{"type":"number","description":"It represents the third party total amount."},"CustomFieldH1":{"type":"string","description":"Custom Fields (CustomFieldH1 - CustomFieldH30)."},"ItemNumber":{"type":"string","description":"The item's (SKU) number. This property is unique to this item, another item cannot be created with the same Item Number."},"ItemUpc":{"type":"string","description":"The item's UPC code."},"ItemBrand":{"type":"string","description":"The item's Brand."},"UnitPrice":{"type":"number","description":"The item's Unit Price."},"Qty":{"type":"number","description":"The item's Qty."},"Discount":{"type":"number","description":"The item's Discount."},"DiscountTypeName":{"type":"string","description":"Percentage or Amount."},"SellUomName":{"type":"string","description":"Selling unit of measurement of the item"},"ItemNotes":{"type":"string","description":"It represents the item notes for the Item."},"TaxItemCode1":{"type":"string","description":"It represents the TaxItemCode1 for the Item."},"TaxItemValue1":{"type":"number","description":"It represents the TaxItemValue1 for the Item."},"TaxItemCode2":{"type":"string","description":"It represents the TaxItemCode2 for the Item."},"TaxItemValue2":{"type":"number","description":"It represents the TaxItemValue2 for the Item."},"TaxItemCode3":{"type":"string","description":"It represents the TaxItemCode3 for the Item."},"TaxItemValue3":{"type":"number","description":"It represents the TaxItemValue3 for the Item."},"TaxItemCode4":{"type":"string","description":"It represents the TaxItemCode4 for the Item."},"TaxItemValue4":{"type":"number","description":"It represents the TaxItemValue4 for the Item."},"ItemCategoryName":{"type":"string","description":"It represents the name of item category here."},"ItemGroupName":{"type":"string","description":"It represents the name of item group here."},"ItemShippingCost":{"type":"number","description":"It represents the item shipping cost."},"ItemShippingTaxItemCode1":{"type":"string","description":"It represents the ItemShippingTaxItemCode1."},"ItemShippingTaxItemValue1":{"type":"number","description":"It represents the ItemShippingTaxItemValue1."},"ItemShippingTaxItemCode2":{"type":"string","description":"It represents the ItemShippingTaxItemCode2."},"ItemShippingTaxItemValue2":{"type":"number","description":"It represents the ItemShippingTaxItemValue2."},"ItemShippingTaxItemCode3":{"type":"string","description":"It represents the ItemShippingTaxItemCode3."},"ItemShippingTaxItemValue3":{"type":"number","description":"It represents the ItemShippingTaxItemValue3."},"ItemShippingTaxItemCode4":{"type":"string","description":"It represents the ItemShippingTaxItemCode4."},"ItemShippingTaxItemValue4":{"type":"number","description":"It represents the ItemShippingTaxItemValue4."},"BaseUomCode":{"type":"string","description":"It represents the code for base value of unit of measurement."},"SellUomCode":{"type":"string","description":"It represents the code for unit of measurement used for selling."},"VASItemName":{"type":"string","description":"Value added service name."},"VASItemCost":{"type":"number","description":"Value added service item cost."},"AutoReleaseSalesOrder":{"type":"boolean","description":"This will auto release the sales order while creating sales order."},"CustomFieldD1":{"type":"string","description":"Custom Fields (CustomFieldD1 - CustomFieldD30)."},"AccountCode3PL":{"type":"string","description":"The code associated with the 3PL account."},"RequirePackAndHold":{"type":"boolean","description":"Indicates whether packing and holding of items are required for the order."},"IsPackAndHold":{"type":"boolean","description":"Indicates whether the order is packed and held."},"SoBatchId":{"type":"integer","description":"The ID of the sales order batch."},"PackingSlipNumbers":{"type":"string","description":"The numbers associated with the packing slips for the order."},"TotalCancelQty":{"type":"number","description":"The total quantity of canceled items."},"Customer3plTypeName":{"type":"string","description":"The type name of the customer associated with the 3PL account."},"IsVASRequired":{"type":"boolean","description":"Indicates whether Value-Added Services (VAS) are required for the order."},"VASInstruction":{"type":"string","description":"Instructions for Value-Added Services (VAS) associated with the order."},"IsVASCompleted":{"type":"boolean","description":"Indicates whether Value-Added Services (VAS) for the order are completed."},"ExceptionFlag":{"type":"boolean","description":"Indicates if there is an exception related to the order."},"SoBatchNumber":{"type":"string","description":"The batch number associated with the sales order."},"PackedDttm":{"type":"string","description":"The date and time when the order was packed.","format":"date-time"},"ReadyToShipDttm":{"type":"string","description":"The date and time when the order is ready to be shipped.","format":"date-time"},"StagedDttm":{"type":"string","description":"The date and time when the order is staged.","format":"date-time"},"IsLeadOrder":{"type":"boolean","description":"Indicates whether the order is a lead order."},"IsPackAndHoldReleased":{"type":"boolean","description":"Indicates whether the packed and held items are released."},"CustomerAccountNumber":{"type":"string","description":"The account number of the customer associated with the 3PL account."},"ShipToAddrHashCode":{"type":"integer","description":"The hash code of the shipping address."},"Account3plId":{"type":"integer","description":"The ID of the 3PL account."},"MinimumATSPercent":{"type":"number","description":"The minimum Available-to-Sell (ATS) percentage."},"LockFlag":{"type":"boolean","description":"Indicates if the order is locked."},"FillRateFailedFlag":{"type":"boolean","description":"Indicates if the fill rate for the order failed."},"Account3plName":{"type":"string","description":"The name of the 3PL account."},"EIN":{"type":"string","description":"The EIN associated with the account."},"DutyPaymentTermsId":{"type":"integer","description":"The ID of the duty payment terms."},"DutyPaymentTermsCode":{"type":"string","description":"The code for the duty payment terms."},"DutyPaymentTerms":{"type":"string","description":"The duty payment terms."},"CustomComment":{"type":"string","description":"Custom comments associated with the order."},"PriorityCode":{"type":"string","description":"The priority code associated with the order."},"IsAccount3plApiRequest":{"type":"boolean","description":"Indicates if the request is made through the 3PL API."},"CustomerDefaultOrderTypeName":{"type":"string","description":"The default order type associated with the customer."},"CustomerDefaultProjectClassName":{"type":"string","description":"The default project class linked to the customer."},"IsCustomerTaxExempt":{"type":"boolean","description":"Indicates whether the customer is tax-exempt (`true` or `false`)."},"CustomerTaxNumber1":{"type":"string","description":"It represents the primary tax identification number of the customer."},"CustomerTaxNumber2":{"type":"string","description":"It represents the secondary tax identification number of the customer (if applicable)."},"CustomerTags":{"type":"string","description":"Tags or labels associated with the customer for categorization or reporting purposes."}},"additionalProperties":true,"required":["ThirdPartyRefNo","SaleStoreName","CurrencyCode","CustomerName","OrderDate","DateToBeShipped","ExchangeRate","DepositRequiredAmount","ItemNumber","UnitPrice","Qty","RequirePackAndHold","IsVASRequired"]}}},"paths":{"/api/xerp/account3pl/createsalesorder":{"post":{"responses":{"200":{"description":"OK","headers":{}}},"tags":["Third-Party Logistics (3PL)"],"description":"Creates a new sales order in the system corresponding to the provided 3PL account token.\nName               |Data Type          |Description\n-------------------|-------------------|-------------------\n``AccountToken``|string|A unique authentication token generated specifically for a 3PL account. It is used as a parameter in API requests to authenticate and access resources related to the corresponding 3PL account.\n``ThirdPartyRefNo``|string, required|A reference number for the order. If an order in Xorosoft ERP exists with the same ThirdPartyRefNo, it will be detected as a duplicate and will not be created.\n``ThirdPartySource``|string|If the order came from a third party platform, it can be indicated here.\n``ThirdPartyIconUrl``|string|Use a URL that ends with .png or .jpg for an image of the third party source.For example, a Joor order would have a Joor icon.\n``ThirdPartyDisplayName``|string|It represents the name of third party source.\n``CheckThirdPartySource``|bool|Property, when set to true, checks if a third-party reference number exists with the same third-party source\n``SaleStoreName``|string, required|It is Sale Store's (inventory set) name here exactly as it is in Xorosoft ERP.\n``StoreName``|string|It is Ship Store's (inventory set) name here exactly as it is in Xorosoft ERP. If this is left blank, then **SaleStoreName will be used.\n``CurrencyCode``|string, required|It represents the currency for the order. This must match with the customer's currency. Choose from: USD,CAD,EUR,AUD.\n``CustomerName``|string, required|It represents the name of customer.\n``CustomerFirstName``|string|First Name of the customer.\n``CustomerLastName``|string|Last Name of the customer.\n``CustomerMainPhone``|string|Customer main Phone Number\n``CustomerEmailMain``|string|The customer's email address.\n``CustomerPO``|string|Customer PO field.\n``OrderDate``|DateTime, required|The date the order was placed.\n``DateToBeShipped``|DateTime, required|The date the order is to be shipped before or on. \n``LastDateToBeShipped``|DateTime|The date the order should be shipped.\n``DateToBeCancelled``|DateTime|If the order hasn't been fulfilled by this date, then it can be  cancelled, MM-DD-YYYY\n``OrderClassCode``|string|It represents the Code categorize your orders.\n``OrderClassName``|string|It represents the name of the Class to categorize your orders.\n``OrderTypeCode``|string|It represents the code for type of order.\n``OrderTypeName``|string|It represents the name for type of order.\n``ExchangeRate``|double, required|It represents the exchange rate betweeen currencies. If currency is the same as home currency, then put 1 here. Otherwise put the exchange rate for the order.\n``Memo``|string|A memo for the order can be entered here.\n``PaymentTermsName``|string|It is a payment term from the system for this order. This must match up exactly to a Payment Term in Xorosoft ERP.\n``PaymentTermsType``|string|It represents the code for type of payment terms.\n``RefNo``|string|It is a reference number for the order here. This can be an internal reference number, as opposed to a third-party reference number.\n``Tags``|string|It represents tags here for the order and multiple tags can be separated by a comma.\n``SalesRepId``|string|Please refer to the User Centre in your Xorosoft ERP system and enter the UserID of the sales rep for this Sales Order.\n``ShipMethodName``|string|It is a ship method for the order here. Choose from: Pick Up, Delivery(Own Truck) and Delivery(Third Party)\n``CarrierName``|string|If ShipMethodName is not Pick Up, then enter a carrier.\n``CarrierCode``|string|The code for the carrier that is to be used(or was used) when this order is shipped(was shipped).\n``ShipServiceName``|string|It represents the name of ship service for the order.\n``ShipServiceCode``|string|The code for the shipping service that is to be used(or was used) when this order is shipped(was shipped).\n``FobName``|string|It represents the FobName for the order.\n``IsOrderTaxExempt``|bool|It represents the boolean represented in the form of N for Exempt tax and Y for Active Tax.\n``ShippingTaxItemCode1``|string|It represents the ShippingTaxItemCode1 for the Order.\n``ShippingTaxItemValue1``|double |It represents the ShippingTaxItemValue1 for the Order.\n``ShippingTaxItemCode2``|string|It represents the ShippingTaxItemCode2 for the Order.\n``ShippingTaxItemValue2``|double |It represents the ShippingTaxItemValue2 for the Order.\n``ShippingTaxItemCode3``|string|It represents the ShippingTaxItemCode3 for the Order.\n``ShippingTaxItemValue3``|double |It represents the ShippingTaxItemValue3 for the Order.\n``ShippingTaxItemCode4``|string|It represents the ShippingTaxItemCode4 for the Order.\n``ShippingTaxItemValue4``|double |It represents the ShippingTaxItemValue5 for the Order.\n``ShippingTermsName``|string|It represents the shipping terms.Choose from: Prepaid, Collect, Prepaid& Billed, Collect& Allowed and Third Party Billing.\n``ShippingAccountNumber``|string|It represents the shipping account number here.\n``ShippingCost``|double |It represents the shipping cost for the Order.   \n``ShippingNotes``|string|It represents the shipping notes for the Order.\n``ShipToFirstName``|string|It represents the first name of ship to for the Order.\n``ShipToLastName``|string|It represents the last name of ship to for the Order.\n``ShipToName``|string|It represents the Main address name of ship to for the Order.\n``ShipToCompanyName``|string|It represents the company name of ship to for the Order.\n``ShipToAddr``|string|It represents the address line 1 of ship to for the Order.\n``ShipToAddr2``|string|It represents the address line 2 of ship to for the Order.\n``ShipToCity``|string|It represents the city of ship to for the Order.\n``ShipToCountry``|string|It represents the country name of ship to for the Order.\n``ShipToCountryISO2``|string|It is a code to Identify a Country of ship to for the Order\n``ShipToState``|string|It represents the state name of ship to for the Order.\n``ShipToStateAbbr``|string|It is the abbrevation of state of ship to for the Order.\n``ShipToZpCode``|string|It represents the zip code of ship to for the Order.\n``ShipToPhoneNumber``|string|It represents the phone number of ship to for the Order.\n``ShipToEmail``|string|It represents the email of ship to for the Order.\n``BuyerName``|string|It is a name of Buyer.\n``BillToFirstName``|string|It represents the first name of bill to for the Order.\n``BillToLastName``|string|It represents the last name of bill to for the Order.\n``BillToName``|string|It represents the Main address name of bill to for the Order.\n``BillToAddr``|string|It represents the address line 1 of bill to for the Order.\n``BillToAddr2``|string|It represents the address line 2 of bill to for the Order.\n``BillToCity``|string|It represents the city of bill to for the Order.\n``BillToCountry``|string|It represents the country name of bill to for the Order.\n``BillToCountryISO2``|string|It is a code to Identify a Country of bill to for the Order\n``BillToState``|string|It represents the state name of bill to for the Order.\n``BillToStateAbbr``|string|It is the abbrevation of state name of bill to for the Order.\n``BillToZpCode``|string|It represents the zip code of bill to for the Order.\n``BillToCompanyName``|string|It represents the company name of bill to for the Order.\n``BillToPhoneNumber``|string|It represents the phone number of bill to for the Order.\n``BillToEmail``|string|It represents the email of bill to for the Order.\n``CustomerGroupName``|string|It represents the customer group name for the Order.\n``DepositRequiredTypeName``|string|It represents the deposit on the order, whether that deposit is Amount or a Percentage.\n``DepositRequiredAmount``|double|It is percentage or amount of deposit required for this order.\n``DepositAmount``|double|It represents the deposit amount for the Deposit.\n``DepositAccountName``|string|It represents the deposit account name for the Account.\n``LiabilityAccountName``|string|It represents the liability account name for the Account.\n``PaymentMethodName``|string|It represents the payment method name for the Method.\n``AutoDepositTotalAmount``|string|It represents the auto deposit total amount for the Total.\n``CustomerServiceRepId``|string|It represents the customer service representative id.\n``ThirdPartyTotalAmount``|double|It represents the third party total amount.\n``CustomFieldH1``|string|Custom Fields (CustomFieldH1 - CustomFieldH30).\n``ItemNumber``|string, required|The item's (SKU) number. This property is unique to this item, another item cannot be created with the same Item Number.\n``ItemUpc``|string|The item's UPC code.\n``ItemBrand``|string|The item's Brand.\n``Description``|string|The item's description.\n``UnitPrice``|double, required|The item's Unit Price.\n``Qty``|double, required|The item's Qty.\n``Discount``|double|The item's Discount.\n``DiscountTypeName``|string|Percentage or Amount.\n``SellUomName``|string|Selling unit of measurement of the item\n``ItemNotes``|string|It represents the item notes for the Item.\n``TaxItemCode1``|string|It represents the TaxItemCode1 for the Item.\n``TaxItemValue1``|double|It represents the TaxItemValue1 for the Item.\n``TaxItemCode2``|string|It represents the TaxItemCode2 for the Item.\n``TaxItemValue2``|double|It represents the TaxItemValue2 for the Item.\n``TaxItemCode3``|string|It represents the TaxItemCode3 for the Item.\n``TaxItemValue3``|double|It represents the TaxItemValue3 for the Item.\n``TaxItemCode4``|string|It represents the TaxItemCode4 for the Item.\n``TaxItemValue4``|double|It represents the TaxItemValue4 for the Item.\n``ItemCategoryName``|string|It represents the name of item category here.\n``ItemGroupName``|string|It represents the name of item group here.\n``ItemShippingCost``|double|It represents the item shipping cost.\n``ItemShippingTaxItemCode1``|string|It represents the ItemShippingTaxItemCode1.\n``ItemShippingTaxItemValue1``|double|It represents the ItemShippingTaxItemValue1.\n``ItemShippingTaxItemCode2``|string|It represents the ItemShippingTaxItemCode2.\n``ItemShippingTaxItemValue2``|double|It represents the ItemShippingTaxItemValue2.\n``ItemShippingTaxItemCode3``|string|It represents the ItemShippingTaxItemCode3.\n``ItemShippingTaxItemValue3``|double|It represents the ItemShippingTaxItemValue3.\n``ItemShippingTaxItemCode4``|string|It represents the ItemShippingTaxItemCode4.\n``ItemShippingTaxItemValue4``|double|It represents the ItemShippingTaxItemValue4.\n``BaseUomCode``|string|It represents the code for base value of unit of measurement.\n``SellUomCode``|string|It represents the code for unit of measurement used for selling.\n``VASItemName``|string|Value added service name.\n``VASItemCost``|double|Value added service item cost. \n``AutoReleaseSalesOrder``|bool|This will auto release the sales order while creating sales order. \n``CustomFieldD1``|string|Custom Fields (CustomFieldD1 - CustomFieldD30).\n``AccountCode3PL``|string|The code associated with the 3PL account.\n``RequirePackAndHold``|bool|Indicates whether packing and holding of items are required for the order.\n``IsPackAndHold``|bool|Indicates whether the order is packed and held.\n``SoBatchId``|int (nullable)|The ID of the sales order batch.\n``PackingSlipNumbers``|string|The numbers associated with the packing slips for the order.\n``TotalCancelQty``|double|The total quantity of canceled items.\n``Customer3plTypeName``|string|The type name of the customer associated with the 3PL account.\n``IsVASRequired``|bool|Indicates whether Value-Added Services (VAS) are required for the order.\n``VASInstruction``|string|Instructions for Value-Added Services (VAS) associated with the order.\n``IsVASCompleted``|bool|Indicates whether Value-Added Services (VAS) for the order are completed.\n``ExceptionFlag``|bool|Indicates if there is an exception related to the order.\n``SoBatchNumber``|string|The batch number associated with the sales order.\n``PackedDttm``|DateTime (nullable)|The date and time when the order was packed.\n``ReadyToShipDttm``|DateTime (nullable)|The date and time when the order is ready to be shipped.\n``StagedDttm``|DateTime (nullable)|The date and time when the order is staged.\n``IsLeadOrder``|bool|Indicates whether the order is a lead order.\n``IsPackAndHoldReleased``|bool|Indicates whether the packed and held items are released.\n``CustomerAccountNumber``|string|The account number of the customer associated with the 3PL account.\n``ShipToAddrHashCode``|int|The hash code of the shipping address.\n``Account3plId``|int|The ID of the 3PL account.\n``MinimumATSPercent``|double|The minimum Available-to-Sell (ATS) percentage.\n``LockFlag``|bool|Indicates if the order is locked.\n``FillRateFailedFlag``|bool|Indicates if the fill rate for the order failed.\n``Account3plName``|string|The name of the 3PL account.\n``EIN``|string|The EIN associated with the account.\n``DutyPaymentTermsId``|int (nullable)|The ID of the duty payment terms.\n``DutyPaymentTermsCode``|string|The code for the duty payment terms.\n``DutyPaymentTerms``|string|The duty payment terms.\n``CustomComment``|string|Custom comments associated with the order.\n``PriorityCode``|string|The priority code associated with the order.\n``IsAccount3plApiRequest``|bool|Indicates if the request is made through the 3PL API.\n``CustomFieldD1``|string|Custom Fields (CustomFieldD1 - CustomFieldD30).\n``CustomerDefaultOrderTypeName``|string|The default order type associated with the customer.                      \n``CustomerDefaultProjectClassName``|string|The default project class linked to the customer. \n``IsCustomerTaxExempt``|bool|Indicates whether the customer is tax-exempt (`true` or `false`).\n``CustomerTaxNumber1``|string|It represents the primary tax identification number of the customer. \n``CustomerTaxNumber2``|string|It represents the secondary tax identification number of the customer (if applicable).\n``CustomerTags``|string|Tags or labels associated with the customer for categorization or reporting purposes.","operationId":"post_account3pl_createsalesorder","summary":"Create Sales Order","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostAccount3plCreatesalesorderRequest"}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xorosoft.com/developers-api/third-party-logistics-3pl/create-sales-order.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
