Request

Creates a new unsubmitted order from a previously submitted order, copying available line items with recalculated prices.

Security
OAuth2(Required scopes: FullAccessOrderAdminShopper)
Path
directionstring(OrderDirection)required

Direction of the order, from the current user's perspective.

Enum:"Incoming""Outgoing""All"
orderIDstringrequired

ID of the order.

Bodyapplication/jsonrequired
IDstring, <= 100 characters
Example:""
FromCompanyIDstring

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.

Example:""
ToCompanyIDstring

ID of the marketplace owner or supplier receiving the order, only writable on create. Mainly useful to the user placing it.

Example:""
FromUserIDstring

This property is only writable when creating an order on behalf of a buyer user.

Example:""
BillingAddressIDstring
Example:""
ShippingAddressIDstring

ID of the ShippingAddress for all line items on the order. Null when there are multiple shipping addresses defined.

Example:""
Commentsstring, <= 2000 characters
Example:""
ShippingCostnumber, (float)

Modifying requires OverrideShipping role.

Example:0
TaxCostnumber, (float)

Modifying requires TaxOverride role.

Example:0
Gratuitynumber, (float), >= 0
Default:0
Example:0
xpobject
Example:
{}
curl -i -X POST \
  'https://api.ordercloud.io/v1/orders/{direction}/{orderID}/repeat' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "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": {}
  }'

Responses

Creates a new unsubmitted order from a previously submitted order, copying available line items with recalculated prices.

Bodyapplication/json
Orderobject(Order)

The new unsubmitted order created from the original.

Example:
{ "ID": "", "FromUser": { "ID": "", "CompanyID": "", "Username": "", "Password": "", "FirstName": "", "LastName": "", "Email": "", "Phone": "", "TermsAccepted": "2018-01-01T00:00:00-06:00", "Active": false, "xp": {}, "AvailableRoles": [ … ], "Locale": { … }, "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": {} }
UnavailableItemsArray of objects(UnavailableLineItem)

Products from the original order that could not be added to the new order.

Example:
[ { "ProductID": "", "Error": { … } } ]
Response
{ "Order": { "ID": "", "FromUser": { … }, "FromCompanyID": "", "ToCompanyID": "", "FromUserID": "", "BillingAddressID": "", "BillingAddress": { … }, "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": {} }, "UnavailableItems": [ { … } ] }