Click or drag to resize

IUCJsonOrderCreate Method

Create Customer Order

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: Commerce Service for LS Central 2024.6
Syntax
C#
SalesEntry OrderCreate(
	Order request,
	bool returnOrderIdOnly
)

Parameters

request
Type: LSRetail.Omni.Domain.DataModel.Loyalty.OrdersOrder
returnOrderIdOnly
Type: SystemBoolean
Only return Order Id back, not full order object

Return Value

Type: SalesEntry
SalesEntry object for order if order creation was successful
Remarks
LS Central WS2 : CustomerOrderCreateVx
Examples
Sample requests including minimum data needed to be able to process the request in LS Commerce

Order to be shipped to Customer

REST Sample Request
{
    "request": {
        "CardId": "10021",
        "OrderDiscountLines": [],
        "OrderLines": [{
            "Amount": "160.0",
            "DiscountAmount": "0",
            "DiscountPercent": "0",
            "ItemId": "40020",
            "LineNumber": "1",
            "LineType": "0",
            "NetAmount": "128.00",
            "NetPrice": "64.0",
            "Price": "80.0",
            "Quantity": "2",
            "TaxAmount": "32.0",
            "VariantId": "002"
        }],
        "OrderPayments": [{
            "Amount": "160.0",
            "AuthorizationCode": "123456",
            "CardNumber": "10xx xxxx xxxx 1475",
            "CardType": "VISA",
            "CurrencyCode": "GBP",
            "CurrencyFactor": 1,
            "ExternalReference": "MyRef123",
            "LineNumber": 1,
            "PaymentType": "2",
            "PreApprovedValidDate": "\/Date(1892160000000+1000)\/",
            "TenderType": "1",
            "TokenNumber": "123456"
        }],
        "OrderType": "0",
        "PaymentStatus": "10",
        "ShipOrder": "1",
        "ShipToAddress": {
            "Address1": "600 Lue Via",
            "Address2": "None",
            "City": "North Viola",
            "Country": "Belgium",
            "PhoneNumber": "555-555-5555",
            "PostCode": "88391-4289",
            "StateProvinceRegion": "None",
            "Type": "0"
        },
        "StoreId": "S0013",
        "TotalAmount": "160.0",
        "TotalDiscount": "0",
        "TotalNetAmount": "128.0"
    },
    "returnOrderIdOnly": 0
}
Order with Manual 10% Discount to be shipped to Customer
REST Sample Request
{
    "request": {
        "CardId": "10021",
        "OrderDiscountLines": [{
            "DiscountAmount": "16.0",
            "DiscountPercent": "10.0",
            "DiscountType": "4",
            "LineNumber": "1",
            "No": "10000"
        }],
        "OrderLines": [{
            "Amount": "144.0",
            "DiscountAmount": "16.3",
            "DiscountPercent": "10.0",
            "ItemId": "40020",
            "LineNumber": "1",
            "LineType": "0",
            "NetAmount": "115.20",
            "NetPrice": "64.0",
            "Price": "80.0",
            "Quantity": "2",
            "TaxAmount": "28.0",
            "VariantId": "002"
        }],
        "OrderPayments": [{
            "Amount": "160.0",
            "AuthorizationCode": "123456",
            "CardNumber": "10xx xxxx xxxx 1475",
            "CardType": "VISA",
            "CurrencyCode": "GBP",
            "CurrencyFactor": 1,
            "ExternalReference": "MyRef123",
            "LineNumber": 1,
            "PaymentType": "2",
            "PreApprovedValidDate": "\/Date(1892160000000+1000)\/",
            "TenderType": "1",
            "TokenNumber": "123456"
        }],
        "OrderType": "0",
        "PaymentStatus": "10",
        "ShipOrder": "1",
        "ShipToAddress": {
            "Address1": "600 Lue Via",
            "Address2": "None",
            "City": "North Viola",
            "Country": "Belgium",
            "PhoneNumber": "555-555-5555",
            "PostCode": "88391-4289",
            "StateProvinceRegion": "None",
            "Type": "0"
        },
        "StoreId": "S0013",
        "TotalAmount": "144.0",
        "TotalDiscount": "16.0",
        "TotalNetAmount": "115.20"
    },
    "returnOrderIdOnly": 0
}
Order 3 Different payments, Credit Card, Loyalty Points (Currency is LOY and CardNumber is MemberContact Card ID) and Gift Card (CardNumber is the Gift Card Id)
REST Sample Request
{
    "request": {
        "CardId": "10021",
        "OrderDiscountLines": [],
        "OrderLines": [{
            "Amount": "160.0",
            "DiscountAmount": "0",
            "DiscountPercent": "0",
            "ItemId": "40020",
            "LineNumber": "1",
            "LineType": "0",
            "NetAmount": "128.00",
            "NetPrice": "64.0",
            "Price": "80.0",
            "Quantity": "2",
            "TaxAmount": "32.0",
            "VariantId": "002"
        }],
        "OrderPayments": [{
            "Amount": "160.0",
            "AuthorizationCode": "123456",
            "CardNumber": "10xx xxxx xxxx 1475",
            "CardType": "VISA",
            "CurrencyCode": "GBP",
            "CurrencyFactor": 1,
            "ExternalReference": "MyRef123",
            "LineNumber": 1,
            "PaymentType": "2",
            "PreApprovedValidDate": "\/Date(1892160000000+1000)\/",
            "TenderType": "1",
            "TokenNumber": "123456"
        },
        {
            "Amount": "200.0",
            "CardNumber": "10021",
            "CurrencyCode": "LOY",
            "CurrencyFactor": "0.1",
            "LineNumber": 2,
            "TenderType": "3"
        },
        {
            "Amount": "20.0",
            "AuthorizationCode": 9999,
            "CardNumber": "1000",
            "CurrencyCode": "GBP",
            "CurrencyFactor": "1.0",
            "LineNumber": 3,
            "TenderType": "4"
        }],
        "OrderType": "0",
        "PaymentStatus": "10",
        "ShipOrder": "1",
        "ShipToAddress": {
            "Address1": "600 Lue Via",
            "Address2": "None",
            "City": "North Viola",
            "Country": "Belgium",
            "PhoneNumber": "555-555-5555",
            "PostCode": "88391-4289",
            "StateProvinceRegion": "None",
            "Type": "0"
        },
        "StoreId": "S0013",
        "TotalAmount": "160.0",
        "TotalDiscount": "0",
        "TotalNetAmount": "128.0"
    },
    "returnOrderIdOnly": 0
}
Order to be collected at Store S0001
REST Sample Request
{
    "request": {
        "CardId": "10021",
        "CollectLocation": "S0001",
        "OrderDiscountLines": [],
        "OrderLines": [{
            "Amount": "160.0",
            "ClickAndCollectLine": "1",
            "DiscountAmount": "0",
            "DiscountPercent": "0",
            "ItemId": "40020",
            "LineNumber": "1",
            "LineType": "0",
            "NetAmount": "128.00",
            "NetPrice": "64.0",
            "Price": "80.0",
            "Quantity": "2",
            "StoreId": "S0001",
            "TaxAmount": "32.0",
            "VariantId": "002"
        }],
        "OrderPayments": [],
        "OrderType": "1",
        "PaymentStatus": "0",
        "ShipOrder": "0",
        "ShipToAddress": {},
        "StoreId": "S0013",
        "TotalAmount": "160.0",
        "TotalDiscount": "0",
        "TotalNetAmount": "128.0"
    },
    "returnOrderIdOnly": 0
}
See Also