POST api/Order
Add a new order to the system.
Request Information
URI Parameters
None.
Body Parameters
Order model
OrderName | Description | Type | Additional information |
---|---|---|---|
CustomerId |
Customer ID. |
System.Int32 |
Required |
ClientReference |
Client reference. |
System.String |
Required String length: inclusive between 4 and 100 |
ServiceType |
Service type. Supply the 'name' or 'id' of the 'ServiceType'. |
PdsWebApi.Enums.ServiceType |
Required |
Cartons |
Number of Cartons |
System.Int32 |
Required Range: inclusive between 0 and 2147483647 |
Pallets |
Number of Pallets |
System.Int32 |
Required Range: inclusive between 0 and 2147483647 |
Others |
Number of Others |
System.Int32 |
Required Range: inclusive between 0 and 2147483647 |
Weight |
Weight |
System.Double |
Required Range: inclusive between 0,1 and 1,79769313486232E+308 |
Address |
Address |
PdsWebApi.Models.Address |
Required |
DueDate |
Due date |
System.DateOnly |
None. |
Earliestdate |
Earliest date |
System.DateOnly |
None. |
TimeFrom |
Time From |
System.TimeOnly |
None. |
TimeUntil |
Time Until |
System.TimeOnly |
None. |
ExtraReference2 |
Extra reference 2 |
System.String |
String length: inclusive between 0 and 50 |
ExtraReference3 |
Extra reference 3 |
System.String |
String length: inclusive between 0 and 50 |
ExtraReference4 |
Extra reference 4 |
System.String |
String length: inclusive between 0 and 50 |
PremiumId |
Premium ID |
System.Int32 |
None. |
Volume |
Volume |
System.Double |
Range: inclusive between -1,79769313486232E+308 and 1,79769313486232E+308 |
LoadingMeters |
Loading meters |
System.Double |
Range: inclusive between -1,79769313486232E+308 and 1,79769313486232E+308 |
DriverRemarks |
Driver remarks |
System.String |
String length: inclusive between 0 and 200 |
B2C |
B2C |
System.Boolean |
None. |
Request Formats
application/json, text/json
{ "CustomerId": 1, "ClientReference": "sample string 2", "ServiceType": 14, "Cartons": 3, "Pallets": 4, "Others": 5, "Weight": 6.1, "Address": { "Name": "sample string 1", "AddressLine": "sample string 2", "PostalCode": "sample string 3", "Residence": "sample string 4", "Contact": "sample string 5", "Phone": "sample string 6", "EmailAddress": "sample string 7" }, "DueDate": "0001-01-01", "Earliestdate": "0001-01-01", "TimeFrom": "00:00", "TimeUntil": "00:00", "ExtraReference2": "sample string 7", "ExtraReference3": "sample string 8", "ExtraReference4": "sample string 9", "PremiumId": 1, "Volume": 1.1, "LoadingMeters": 1.1, "DriverRemarks": "sample string 10", "B2C": true }
application/xml, text/xml
<Order xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PdsWebApi.Models"> <Address> <AddressLine>sample string 2</AddressLine> <Contact>sample string 5</Contact> <EmailAddress>sample string 7</EmailAddress> <Name>sample string 1</Name> <Phone>sample string 6</Phone> <PostalCode>sample string 3</PostalCode> <Residence>sample string 4</Residence> </Address> <B2C>true</B2C> <Cartons>3</Cartons> <ClientReference>sample string 2</ClientReference> <CustomerId>1</CustomerId> <DriverRemarks>sample string 10</DriverRemarks> <DueDate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" /> <Earliestdate xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" /> <ExtraReference2>sample string 7</ExtraReference2> <ExtraReference3>sample string 8</ExtraReference3> <ExtraReference4>sample string 9</ExtraReference4> <LoadingMeters>1.1</LoadingMeters> <Others>5</Others> <Pallets>4</Pallets> <PremiumId>1</PremiumId> <ServiceType>Collection</ServiceType> <TimeFrom xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" /> <TimeUntil xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" /> <Volume>1.1</Volume> <Weight>6.1</Weight> </Order>
application/x-www-form-urlencoded
Response Information
Resource Description
A 'ok' response when the supplied model is valid and inserting suceeded. The response also includes the 'id' of the newly inserted item (RitsoftId).
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample not available.