POST | /orders/{OrderNumber}/shipments |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports NAV.ServiceModel
Namespace Global
Namespace NAV.ServiceModel
Public Partial Class NAVOrderShipment
Public Sub New()
OrderShipmentSku = New List(Of NAVOrderShipmentSku)
End Sub
Public Overridable Property ShippingMethod As String
Public Overridable Property ShippingSpeed As String
Public Overridable Property TrackingNumber As String
Public Overridable Property ShipmentStatus As String
Public Overridable Property ShipmentDetails As String
Public Overridable Property ShippingCost As Nullable(Of Decimal)
Public Overridable Property Charge As Nullable(Of Decimal)
Public Overridable Property Tax As Nullable(Of Decimal)
Public Overridable Property ActualShippingCost As Nullable(Of Decimal)
Public Overridable Property CartonWeight As Nullable(Of Decimal)
Public Overridable Property OrderShipmentSku As List(Of NAVOrderShipmentSku)
End Class
Public Partial Class NAVOrderShipmentCreate
Implements IPost
Public Sub New()
Shipment = New List(Of NAVOrderShipment)
End Sub
Public Overridable Property OrderNumber As String
Public Overridable Property ShipmentDateUTC As Nullable(Of Date)
Public Overridable Property Shipment As List(Of NAVOrderShipment)
End Class
Public Partial Class NAVOrderShipmentCreateResponse
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class NAVOrderShipmentSku
Public Overridable Property OrderLineNumber As Nullable(Of Integer)
Public Overridable Property QuantityShipped As Nullable(Of Integer)
Public Overridable Property SubstituteSkuCode As String
End Class
End Namespace
End Namespace
VB.NET NAVOrderShipmentCreate DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /orders/{OrderNumber}/shipments HTTP/1.1
Host: extensions.avon.ca
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"orderNumber":"String","shipmentDateUTC":"0001-01-01T00:00:00.0000000","shipment":[{"shippingMethod":"String","shippingSpeed":"String","trackingNumber":"String","shipmentStatus":"String","shipmentDetails":"String","shippingCost":0,"charge":0,"tax":0,"actualShippingCost":0,"cartonWeight":0,"orderShipmentSku":[{"orderLineNumber":0,"quantityShipped":0,"substituteSkuCode":"String"}]}]}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}