# Forward an order

Creates and submits 0 or more outgoing Orders to Suppliers, one for each unique Product.DefaultSupplierID on this Order.

Endpoint: POST /orders/{direction}/{orderID}/forward
Version: 1.0.448.36393
Security: OAuth2

## Path parameters:

  - `direction` (string, required)
    Direction of the order, from the current user's perspective.
    Enum: "Incoming", "Outgoing", "All"

  - `orderID` (string, required)
    ID of the order.

## Response 200 fields (application/json):

  - `OutgoingOrders` (array)
    The outgoing orders created, one for each unique Product.DefaultSupplierID on the original order.
    Example: [{"ID":"","FromUser":{"ID":"","CompanyID":"","Username":"","Password":"","FirstName":"","LastName":"","Email":"","Phone":"","TermsAccepted":"2018-01-01T00:00:00-06:00","Active":false,"xp":{},"AvailableRoles":[""],"Locale":{"ID":"","OwnerID":"","Currency":"","Language":""},"DateCreated":"2018-01-01T00:00:00-06:00","LastActive":"2018-01-01T00:00:00-06:00","PasswordLastSetDate":"2018-01-01T00:00:00-06:00"},"FromCompanyID":"","ToCompanyID":"","FromUserID":"","BillingAddressID":"","BillingAddress":{"ID":"","DateCreated":"2018-01-01T00:00:00-06:00","CompanyName":"","FirstName":"","LastName":"","Street1":"","Street2":"","City":"","State":"","Zip":"","Country":"","Phone":"","AddressName":"","xp":{}},"ShippingAddressID":"","Comments":"","LineItemCount":0,"Status":"Unsubmitted","DateCreated":"2018-01-01T00:00:00-06:00","DateSubmitted":"2018-01-01T00:00:00-06:00","DateApproved":"2018-01-01T00:00:00-06:00","DateDeclined":"2018-01-01T00:00:00-06:00","DateCanceled":"2018-01-01T00:00:00-06:00","DateCompleted":"2018-01-01T00:00:00-06:00","LastUpdated":"2018-01-01T00:00:00-06:00","Subtotal":0,"ShippingCost":0,"TaxCost":0,"Gratuity":0,"Fees":0,"BaseDiscount":0,"PromotionDiscount":0,"Currency":"","Total":0,"IsSubmitted":false,"SubscriptionID":"","xp":{}}]

  - `OutgoingOrders.ID` (string)

  - `OutgoingOrders.FromUser` (object)
    User placing the order.
    Example: {"ID":"","CompanyID":"","Username":"","Password":"","FirstName":"","LastName":"","Email":"","Phone":"","TermsAccepted":"2018-01-01T00:00:00-06:00","Active":false,"xp":{},"AvailableRoles":[""],"Locale":{"ID":"","OwnerID":"","Currency":"","Language":""},"DateCreated":"2018-01-01T00:00:00-06:00","LastActive":"2018-01-01T00:00:00-06:00","PasswordLastSetDate":"2018-01-01T00:00:00-06:00"}

  - `OutgoingOrders.FromUser.ID` (string)

  - `OutgoingOrders.FromUser.CompanyID` (string)

  - `OutgoingOrders.FromUser.Username` (string)
    Must be unique across all organizations.

  - `OutgoingOrders.FromUser.Password` (string)

  - `OutgoingOrders.FromUser.FirstName` (string)

  - `OutgoingOrders.FromUser.LastName` (string)

  - `OutgoingOrders.FromUser.Email` (string)

  - `OutgoingOrders.FromUser.Phone` (string)

  - `OutgoingOrders.FromUser.TermsAccepted` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.FromUser.Active` (boolean)
    If false, authentication is prohibited.

  - `OutgoingOrders.FromUser.xp` (object)
    Example: {}

  - `OutgoingOrders.FromUser.AvailableRoles` (array)
    List of roles currently available to the user via all security profile assignments.
    Example: [""]

  - `OutgoingOrders.FromUser.Locale` (object)
    Most specific locale assigned to the user, if any.
    Example: {"ID":"","OwnerID":"","Currency":"","Language":""}

  - `OutgoingOrders.FromUser.Locale.ID` (string)

  - `OutgoingOrders.FromUser.Locale.OwnerID` (string)
    ID of the organization that owns the Locale. Only the marketplace owner can override the OwnerID on create.

  - `OutgoingOrders.FromUser.Locale.Currency` (string)
    We recommend using ISO-4217 currency codes for compatibility with tax and payment processors.

  - `OutgoingOrders.FromUser.Locale.Language` (string)
    We recommend using ISO-639 language code - ISO-3166 Country code (e.g. en-US).

  - `OutgoingOrders.FromUser.DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.FromUser.LastActive` (string)
    Accurate within a few minutes. Includes impersonation activity.
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.FromUser.PasswordLastSetDate` (string)
    Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules.
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.FromCompanyID` (string)
    ID of the Buyer placing the order, or the marketplace owner when an order is being forwarded. Mainly useful to the marketplace owner or supplier receiving it.

  - `OutgoingOrders.ToCompanyID` (string)
    ID of the marketplace owner or supplier receiving the order, only writable on create. Mainly useful to the user placing it.

  - `OutgoingOrders.FromUserID` (string)
    This property is only writable when creating an order on behalf of a buyer user.

  - `OutgoingOrders.BillingAddressID` (string)

  - `OutgoingOrders.BillingAddress` (object)
    Example: {"ID":"","DateCreated":"2018-01-01T00:00:00-06:00","CompanyName":"","FirstName":"","LastName":"","Street1":"","Street2":"","City":"","State":"","Zip":"","Country":"","Phone":"","AddressName":"","xp":{}}

  - `OutgoingOrders.BillingAddress.ID` (string)

  - `OutgoingOrders.BillingAddress.DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.BillingAddress.CompanyName` (string)

  - `OutgoingOrders.BillingAddress.FirstName` (string)

  - `OutgoingOrders.BillingAddress.LastName` (string)

  - `OutgoingOrders.BillingAddress.Street1` (string)

  - `OutgoingOrders.BillingAddress.Street2` (string)

  - `OutgoingOrders.BillingAddress.City` (string)

  - `OutgoingOrders.BillingAddress.State` (string)

  - `OutgoingOrders.BillingAddress.Zip` (string)

  - `OutgoingOrders.BillingAddress.Country` (string)

  - `OutgoingOrders.BillingAddress.Phone` (string)

  - `OutgoingOrders.BillingAddress.AddressName` (string)

  - `OutgoingOrders.BillingAddress.xp` (object)
    Example: {}

  - `OutgoingOrders.ShippingAddressID` (string)
    ID of the ShippingAddress for all line items on the order. Null when there are multiple shipping addresses defined.

  - `OutgoingOrders.Comments` (string)

  - `OutgoingOrders.LineItemCount` (integer)

  - `OutgoingOrders.Status` (string)
    Enum: "Unsubmitted", "AwaitingApproval", "Declined", "Open", "Completed", "Canceled"

  - `OutgoingOrders.DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.DateSubmitted` (string)
    Null until the order passes from the buyer to the marketplace owner, including when Status is PendingApproval.
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.DateApproved` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.DateDeclined` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.DateCanceled` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.DateCompleted` (string)
    Populated when all items on an order have shipped, or the order is explicitly completed.
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.LastUpdated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `OutgoingOrders.Subtotal` (number)
    Sum of all LineItem.LineSubtotals.

  - `OutgoingOrders.ShippingCost` (number)
    Modifying requires OverrideShipping role.

  - `OutgoingOrders.TaxCost` (number)
    Modifying requires TaxOverride role.

  - `OutgoingOrders.Gratuity` (number)

  - `OutgoingOrders.Fees` (number)
    Fees associated with order or line items

  - `OutgoingOrders.BaseDiscount` (number)
    Sum of all discount amounts from discount assignments applied to line items on this order.

  - `OutgoingOrders.PromotionDiscount` (number)
    Sum of all promotion amounts applied to the order.

  - `OutgoingOrders.Currency` (string)
    Inherited from the user placing the order.

  - `OutgoingOrders.Total` (number)
    Subtotal - BaseDiscount - PromotionDiscount + TaxCost + ShippingCost + Gratuity + Fees

  - `OutgoingOrders.IsSubmitted` (boolean)
    True if this order has been passed from the Buyer to the marketplace owner or supplier.

  - `OutgoingOrders.SubscriptionID` (string)
    ID of the subscription used to create an order in an automated process.

  - `OutgoingOrders.xp` (object)
    Example: {}

  - `RemainingLineItemIDs` (array)
    IDs of line items not added to an outgoing order, most likely because Product.DefaultSupplierID is not set.
    Example: [""]

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


