Import Order

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

The Import API allows for a historical order to be imported from the previous version of OMS to Unified Commerce. These OMS orders are displayed in the Admin UI so that their data can be viewed, but no edits are allowed. Only orders in the fulfilled or canceled statuses can be imported using this UCP, and it uses a simplified version of the Create Order request body.

Production URLhttps://{tenantId}-translation.mozu.com/api/v2/importOrder
Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v2/importOrder
Supported FormatsJSON
HTTP MethodPOST

Example

The example case imports an order with the following information:

  • Order ID – 1010101
  • Status - FULFILLED

Parameters

As a version of the Create Order API, importation requires similar general order information, customer details, order items, payment information, and shipping method/address as defined there. 

The main difference between these two APIs are two fields:

  • status: required for the Import Order API and must be FULFILLED or CANCELED
  • importedCreationDate: optional; if set, it's copied to the acceptedDate field of the UCP order

Note that the request data can include one or both of the cardNumber and ccLastFour fields (along with a ccFirstSix). While cardNumber may be a credit card token and not the actual card number, the ccLastFour field explicitly sends in the last four digits of the real credit card number. These four digits will then be displayed in the Order Admin UI (such as for CSRs to confirm payment information with a customer). If ccLastFour is not provided, then the UI will fall back to using the last four digits of the cardNumber field.

The Full Request

This is the entire request that will import the example order.

{
    "status": "FULFILLED",
    "importedCreationDate": "2021-06-10T05:29:58.003Z",
    "orderID": 1010101,
    "customer": {
        "customerID": "11111",
        "firstName": "Example",
        "lastName": "Customer",
        "email": "example.customer@kibocommerce.com",
        "password": "****",
        "phone1": "000-111-1010",
        "active": "ACTIVE",
        "accountCreated": null,
        "customData": null
    },
    "externalOrderID": "1010100101_09090909",
    "manufacturerID": 11111,
    "catalogID": 10,
    "currency": "USD",
    "locale": "en-US",
    "currencyLocale": null,
    "landingCode": null,
    "orderComment": null,
    "orderItems": [
        {
            "product": {
                "productID": null,
                "partNumber": "TestPart1",
                "UPC": "TestUPC1",
                "SKU": "TestSKU1",
                "name": "Test Item 1",
                "retailPrice": 99.99,
                "offerPrice": 99.99,
                "averageDealerMargin": null,
                "availability": "Y",
                "serviceType": null,
                "certLevel": null,
                "imageUrl": ".../image.png",
                "productDetailsURL": null
            },
            "itemSpecifics": {
                "itemSpecificsID": null,
                "externalItemID": null,
                "externalParentItemID": null,
                "options": {
                    "MFG Part #": "00435",
                    "Shipping": ""
                },
                "actualPrice": 99.99,
                "quantity": 15,
                "shipping": 3,
                "shippingTax": null,
                "shippingTaxRate": null,
                "giftCardInfo": null,
                "itemTaxOverride": 1.21,
                "itemTaxRateOverride": null,
                "customItemData": {
                    "image_url": ".../image.png"
                },
                "serialNumberRequired": true,
                "expectedDeliveryDate": null,
                "orderItemUnits": null,
                "discounts": null,
                "isReturnable": null,
                "parentOrderItemID": null
            }
        }
    ],
    "orderPayments": [
        {
            "paymentMethod": {
                "billingAddress": {
                    "addressID": null,
                    "customerID": null,
                    "firstName": "Example",
                    "lastName": "Customer",
                    "addressLine1": "100 Example Street",
                    "addressLine2": null,
                    "addressLine3": null,
                    "phone": "0001111010",
                    "city": "Dallas",
                    "state": "TX",
                    "postalCode": "75201",
                    "countryCode": "US",
                    "fraudLock": null,
                    "active": null,
                    "latitude": null,
                    "longitude": null,
                    "company": null,
                    "taxID": null,
                    "isBilling": null,
                    "isShipping": true
                },
                "paymentType": "NO",
                "cardIssuer": null,
                "noOperationType": "VI",
                "cardNumber": "1111111111111111",
                "cardExpiration": "08/2022",
                "cardSecurityCode": "123",
                "payPalToken": null,
                "payPalPayerID": null,
                "publicCardID": null,
                "paymentMethodToken": null,
                "authToken": null,
                "ccFirstSix": null,
                "ccLastFour": null,
                "cardToken": null,
                "creditPlan": null,
                "creditPlanType": null,
                "retailerRef": null,
                "financeCode": null,
                "paymentMethodID": null
            },
            "maxAmount": null,
            "transactionID": null,
            "authorizationID": null,
            "authAmount": 1289.40,
            "orderPaymentID": null
        }
    ],
    "orderGift": null,
    "shippingMethod": {
        "shippingType": null,
        "shipType": "REGULAR",
        "deliveryMethod": "SHIP_TO_HOME",
        "name": null,
        "description": null,
        "price": null,
        "failoverChoice": null,
        "lookupZip": null,
        "smsNumber": null,
        "locationID": null,
        "externalStoreID": null,
        "carrier": null,
        "carrierType": null,
        "serviceType": null,
        "pickupContact": null
    },
    "shippingAddress": {
        "addressID": null,
        "customerID": null,
        "firstName": "Ash_574",
        "lastName": "Durge_40",
        "addressLine1": "100 Example Street",
        "addressLine2": null,
        "addressLine3": null,
        "phone": "0001111010",
        "city": "Dallas",
        "state": "TX",
        "postalCode": "75201",
        "countryCode": "US",
        "fraudLock": null,
        "active": null,
        "latitude": null,
        "longitude": null,
        "company": "",
        "taxID": null,
        "isBilling": null,
        "isShipping": true
    },
    "customerIP": "192.88.000.00",
    "shippingTax": 0,
    "shippingTaxRate": null,
    "forceItemTaxOverride": true,
    "optInRetailer": null,
    "customOrderData": null,
    "fraudData": null,
    "allowSplit": true,
    "isTestOrder": null,
    "sendEmail": true,
    "expectedDeliveryDate": null,
    "discounts": null,
    "channel": null
}

The returned response follows the same structure as the Get Order API, providing information about the order that was imported.