Set a shipping address

Request

Set the Shipping Address of the Line Item. Appropriate only when the Address is not to be saved/reused. To use a Saved Address (i.e. from the Addresses resource), PATCH the Line Item's ShippingAddressID property instead.

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.

lineItemIDstringrequired

ID of the line item.

Bodyapplication/jsonrequired
Street1string, <= 100 charactersrequired
Example:""
Citystring, <= 100 charactersrequired
Example:""
Countrystring, <= 2 charactersrequired
Example:""
IDstring, <= 100 characters
Example:""
CompanyNamestring, <= 100 characters
Example:""
FirstNamestring, <= 100 characters
Example:""
LastNamestring, <= 100 characters
Example:""
Street2string, <= 100 characters
Example:""
Statestring, <= 100 characters
Example:""
Zipstring, <= 100 characters
Example:""
Phonestring, <= 100 characters
Example:""
AddressNamestring, <= 100 characters
Example:""
xpobject
Example:
{}
curl -i -X PUT \
  'https://api.ordercloud.io/v1/orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ID": "",
    "DateCreated": "2018-01-01T00:00:00-06:00",
    "CompanyName": "",
    "FirstName": "",
    "LastName": "",
    "Street1": "",
    "Street2": "",
    "City": "",
    "State": "",
    "Zip": "",
    "Country": "",
    "Phone": "",
    "AddressName": "",
    "xp": {}
  }'

Responses

Set the Shipping Address of the Line Item. Appropriate only when the Address is not to be saved/reused. To use a Saved Address (i.e. from the Addresses resource), PATCH the Line Item's ShippingAddressID property instead.

Bodyapplication/json
IDstring, <= 100 characters
Example:""
ProductIDstring
Example:""
Quantityinteger, (int32), >= 1
Default:1
Example:0
BundleItemIDstringread-only

The ID of the line item that represents the bundle. Signifies that the product is being purchased as part of a bundle.

Example:""
IsBundlebooleanread-only

When true, this item represents a bundle being purchased.

Example:false
DateAddedstring, (date-time)read-only
Example:"2018-01-01T00:00:00-06:00"
QuantityShippedinteger, (int32)read-only

Sum of QuantityShipped from all shipment items.

Example:0
UnitPricenumber, (float)

Auto calculated price per quantity. Modification requires OverrideUnitPrice role.

Example:0
PromotionDiscountnumber, (float)read-only

Sum of all line item level promotion discount amounts applied.

Example:0
BaseDiscountnumber, (float)read-only

Discount amount from discount assignments applied to this line item.

Example:0
DiscountIDstringread-only

ID of the discount applied to this line item.

Example:""
LineTotalnumber, (float)read-only

LineSubtotal - BaseDiscount - PromotionDiscount

Example:0
LineSubtotalnumber, (float)read-only

UnitPrice x Quantity

Example:0
CostCenterstring

For reference only, does not influence any OrderCloud behavior.

Example:""
DateNeededstring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
ShippingAccountstring

For reference only, does not influence any OrderCloud behavior.

Example:""
ShippingAddressIDstring
Example:""
ShipFromAddressIDstring

Marketplace owner or supplier AddressID where the product will be shipped from. Can be used to calculate shipping costs.

Example:""
Productobject(LineItemProduct)read-only
Example:
{ "ID": "", "Name": "", "Description": "", "Returnable": false, "QuantityMultiplier": 0, "ShipWeight": 0, "ShipHeight": 0, "ShipWidth": 0, "ShipLength": 0, "DefaultSupplierID": "", "ParentID": "", "xp": {} }
Variantobject(LineItemVariant)read-only
Example:
{ "ID": "", "Name": "", "Description": "", "ShipWeight": 0, "ShipHeight": 0, "ShipWidth": 0, "ShipLength": 0, "xp": {} }
ShippingAddressobject(Address)read-only
Example:
{ "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }
ShipFromAddressobject(Address)read-only
Example:
{ "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }
SupplierIDstringread-only
Example:""
InventoryRecordIDstring

InventoryRecordID of which product inventory location to use. Cannot be modified once an order is submitted.

Example:""
PriceScheduleIDstringread-only

PriceScheduleID used to determine unit price.

Example:""
IsOnSalebooleanread-only

True when the price schedule and price break has an active SalePrice.

Example:false
PriceOverriddenbooleanread-only

If true, UnitPrice was overridden.

Example:false
SpecsArray of objects(LineItemSpec)
Example:
[ { "SpecID": "", "Name": "", "OptionID": "", "Value": "", "PriceMarkupType": "NoMarkup", "PriceMarkup": 0 } ]
IncomingOrderIDstringread-only

ID of the original order. Only returns a value for the marketplace owner.

Example:""
OutgoingOrderIDstringread-only

ID of the split or forwarded order. Only returns a value for the marketplace owner.

Example:""
InvitationIDstringread-only
xpobject
Example:
{}
Response
{ "ID": "", "ProductID": "", "Quantity": 0, "BundleItemID": "", "IsBundle": false, "DateAdded": "2018-01-01T00:00:00-06:00", "QuantityShipped": 0, "UnitPrice": 0, "PromotionDiscount": 0, "BaseDiscount": 0, "DiscountID": "", "LineTotal": 0, "LineSubtotal": 0, "CostCenter": "", "DateNeeded": "2018-01-01T00:00:00-06:00", "ShippingAccount": "", "ShippingAddressID": "", "ShipFromAddressID": "", "Product": { "ID": "", "Name": "", "Description": "", "Returnable": false, "QuantityMultiplier": 0, "ShipWeight": 0, "ShipHeight": 0, "ShipWidth": 0, "ShipLength": 0, "DefaultSupplierID": "", "ParentID": "", "xp": {} }, "Variant": { "ID": "", "Name": "", "Description": "", "ShipWeight": 0, "ShipHeight": 0, "ShipWidth": 0, "ShipLength": 0, "xp": {} }, "ShippingAddress": { "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }, "ShipFromAddress": { "ID": "", "DateCreated": "2018-01-01T00:00:00-06:00", "CompanyName": "", "FirstName": "", "LastName": "", "Street1": "", "Street2": "", "City": "", "State": "", "Zip": "", "Country": "", "Phone": "", "AddressName": "", "xp": {} }, "SupplierID": "", "InventoryRecordID": "", "PriceScheduleID": "", "IsOnSale": false, "PriceOverridden": false, "Specs": [ { … } ], "IncomingOrderID": "", "OutgoingOrderID": "", "xp": {} }