NAV

<back to all web services

NAVOrderImport

The following routes are available for this service:
POST/orders
import Foundation
import ServiceStack

public class NAVOrderImport : IPost, Codable
{
    public var externalOrderId:String?
    public var orderTypeId:String?
    public var createdDateUTC:Date?
    public var submittedDateUTC:Date?
    public var beeNumberCustomer:Double?
    public var beeNumberPayee:Double?
    public var orderSource:String?
    public var shippingMethod:String?
    public var giftMessage:String?
    public var giftMessageFrom:String?
    public var giftMessageTo:String?
    public var shippingComment:String?
    public var shippingAddress:NAVOrderImportAddress?
    public var orderSkus:[NAVOrderImportSku] = []
    public var orderPayments:[NAVOrderImportPayment] = []
    public var orderFees:[NAVOrderImportFee] = []
    public var subTotal:Double?
    public var orderTotal:Double?
    public var shippingCost:Double?
    public var tax:Double?
    public var shippingTax:Double?
    public var externalDiscountReason:String?
    public var pcLevel:Double?
    public var agentId:String?
    public var numberOfCustomersServed:Double?
    public var versionNumber:String?
    public var versionYear:String?
    public var additionalCode:String?
    public var discountPercent:String?
    public var taxRatePercent:String?
    public var orderWithinTimePeriod:Double?
    public var taxAreaCode:String?
    public var geocode:String?
    public var fundraiserId:String?
    public var warehouseCode:String?
    public var originalReshipExternalOrderId:String?
    public var shippedVersionNumber:String?
    public var shippedVersionYear:String?
    public var masterOrderId:String?
    public var couponValue:String?
    public var salesCenterId:String?
    public var premierLevel:String?
    public var pcLevelCurrentCycle:Double?
    public var premierLevelCurrentCycle:String?
    public var emailAddress:String?
    public var phoneNumber:String?

    required public init(){}
}

public class NAVOrderImportAddress : Codable
{
    public var firstName:String?
    public var lastName:String?
    public var addressLine1:String?
    public var addressLine2:String?
    public var addressLine3:String?
    public var addressLine4:String?
    public var addressLine5:String?
    public var city:String?
    public var stateProvinceCode:String?
    public var postalCode:String?
    public var county:String?
    public var countryCode:String?

    required public init(){}
}

public class NAVOrderImportSku : Codable
{
    public var skuCode:String?
    public var orderLineNumber:Int?
    public var quantity:Int?
    public var isAutoShip:Bool?
    public var orderSkuComponents:[NAVOrderImportSkuComponent] = []
    public var pricePaidPerUnit:Double?
    public var retailPricePerUnit:Double?
    public var netPrice:Double?
    public var netSales:Double?
    public var submittedNetPrice:Double?
    public var submittedNetSales:Double?
    public var manualDiscountAmount:Double?
    public var itemDiscountPercent:Double?
    public var taxAmount:Double?
    public var taxPercentage:Double?
    public var commissionableValueEarned:Double?
    public var qualifyingValueEarned:Double?
    public var qualifyingValueEarnedSubmitted:Double?
    public var overrideCVEarned:Double?
    public var overrideCVEarnedSubmitted:Double?
    public var overrideQVEarned:Double?
    public var groupCVEarned:Double?
    public var groupQVEarned:Double?
    public var uplineCVEarned:Double?
    public var uplineQVEarned:Double?
    public var versionNumber:String?
    public var versionYear:String?
    public var couponCode:String?
    public var substituteIndicator:String?
    public var fulfillmentIndicator:String?
    public var substituteSkuCode:String?
    public var vehicleId:String?
    public var offerId:String?
    public var parentSKUCode:String?
    public var buyingDiscount:Double?
    public var originalOrderQty:Double?
    public var closedQuantity:Double?

    required public init(){}
}

public class NAVOrderImportSkuComponent : Codable
{
    public var parentOrderLineNumber:Int?
    public var orderLineNumber:Int?
    public var skuCode:String?
    public var quantity:Int?
    public var pricePaidPerUnit:Double?
    public var retailPricePerUnit:Double?
    public var netPrice:Double?
    public var taxAmount:Double?
    public var taxPercentage:Double?
    public var versionNumber:String?
    public var versionYear:String?
    public var vehicleId:String?
    public var offerId:String?

    required public init(){}
}

public class NAVOrderImportPayment : Codable
{
    public var paymentType:String?
    public var paymentIdentifier1:String?
    public var paymentIdentifier2:String?
    public var paymentIdentifier3:String?
    public var paymentIdentifier4:String?
    public var paymentIdentifier5:String?
    public var paymentToken:String?
    public var authorizationTime:Date?
    public var authorizationCode:String?
    public var transactionId:String?
    public var amountCharged:Double?
    public var billingAddress:NAVOrderImportAddress?

    required public init(){}
}

public class NAVOrderImportFee : Codable
{
    public var feeSystemKeyword:String?
    public var feeAmount:Double?
    public var taxAmount:Double?
    public var feeTotal:Double?

    required public init(){}
}

public class NAVOrderImportResponse : Codable
{
    public var responseStatus:ResponseStatus?

    required public init(){}
}


Swift NAVOrderImport DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /orders HTTP/1.1 
Host: extensions.avon.ca 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"externalOrderId":"String","orderTypeId":"String","createdDateUTC":"0001-01-01T00:00:00.0000000","submittedDateUTC":"0001-01-01T00:00:00.0000000","beeNumberCustomer":0,"beeNumberPayee":0,"orderSource":"String","shippingMethod":"String","giftMessage":"String","giftMessageFrom":"String","giftMessageTo":"String","shippingComment":"String","shippingAddress":{"firstName":"String","lastName":"String","addressLine1":"String","addressLine2":"String","addressLine3":"String","addressLine4":"String","addressLine5":"String","city":"String","stateProvinceCode":"String","postalCode":"String","county":"String","countryCode":"String"},"orderSkus":[{"skuCode":"String","orderLineNumber":0,"quantity":0,"isAutoShip":false,"orderSkuComponents":[{"parentOrderLineNumber":0,"orderLineNumber":0,"skuCode":"String","quantity":0,"pricePaidPerUnit":0,"retailPricePerUnit":0,"netPrice":0,"taxAmount":0,"taxPercentage":0,"versionNumber":"String","versionYear":"String","vehicleId":"String","offerId":"String"}],"pricePaidPerUnit":0,"retailPricePerUnit":0,"netPrice":0,"netSales":0,"submittedNetPrice":0,"submittedNetSales":0,"manualDiscountAmount":0,"itemDiscountPercent":0,"taxAmount":0,"taxPercentage":0,"commissionableValueEarned":0,"qualifyingValueEarned":0,"qualifyingValueEarnedSubmitted":0,"overrideCVEarned":0,"overrideCVEarnedSubmitted":0,"overrideQVEarned":0,"groupCVEarned":0,"groupQVEarned":0,"uplineCVEarned":0,"uplineQVEarned":0,"versionNumber":"String","versionYear":"String","couponCode":"String","substituteIndicator":"String","fulfillmentIndicator":"String","substituteSkuCode":"String","vehicleId":"String","offerId":"String","parentSKUCode":"String","buyingDiscount":0,"originalOrderQty":0,"closedQuantity":0}],"orderPayments":[{"paymentType":"String","paymentIdentifier1":"String","paymentIdentifier2":"String","paymentIdentifier3":"String","paymentIdentifier4":"String","paymentIdentifier5":"String","paymentToken":"String","authorizationTime":"0001-01-01T00:00:00.0000000","authorizationCode":"String","transactionId":"String","amountCharged":0,"billingAddress":{"firstName":"String","lastName":"String","addressLine1":"String","addressLine2":"String","addressLine3":"String","addressLine4":"String","addressLine5":"String","city":"String","stateProvinceCode":"String","postalCode":"String","county":"String","countryCode":"String"}}],"orderFees":[{"feeSystemKeyword":"String","feeAmount":0,"taxAmount":0,"feeTotal":0}],"subTotal":0,"orderTotal":0,"shippingCost":0,"tax":0,"shippingTax":0,"externalDiscountReason":"String","pcLevel":0,"agentId":"String","numberOfCustomersServed":0,"versionNumber":"String","versionYear":"String","additionalCode":"String","discountPercent":"String","taxRatePercent":"String","orderWithinTimePeriod":0,"taxAreaCode":"String","geocode":"String","fundraiserId":"String","warehouseCode":"String","originalReshipExternalOrderId":"String","shippedVersionNumber":"String","shippedVersionYear":"String","masterOrderId":"String","couponValue":"String","salesCenterId":"String","premierLevel":"String","pcLevelCurrentCycle":0,"premierLevelCurrentCycle":"String","emailAddress":"String","phoneNumber":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}