Back

Search

Search

Methods

Inventory

Orders

Orders /CreateOrders

Response: List<Guid>



Creates new orders, once an order is paid it will be skipped on save. Returns list of pkOrderId's that were saved.

Parameters

NameTypeDescription
ordersList<ChannelOrder>List of orders to create
locationStringLocation to create the order

HTTP Endpoint

Server /Orders / CreateOrders

Permissions


Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/Orders/CreateOrders HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

orders=[
  {
    "UseChannelTax": true,
    "AutomaticallyLinkBySKU": true,
    "Site": "sample string 3",
    "MatchPostalServiceTag": "sample string 4",
    "PostalServiceName": "sample string 5",
    "SavePostalServiceIfNotExist": true,
    "MatchPaymentMethodTag": "sample string 7",
    "PaymentMethodName": "sample string 8",
    "SavePaymentMethodIfNotExist": true,
    "MappingSource": "sample string 10",
    "OrderState": "None",
    "PaymentStatus": "Unpaid",
    "OrderItems": [
      {
        "TaxCostInclusive": true,
        "UseChannelTax": true,
        "PricePerUnit": 3.1,
        "Qty": 4,
        "TaxRate": 5.1,
        "LineDiscount": 6.1,
        "ItemNumber": "sample string 7",
        "ChannelSKU": "sample string 8",
        "IsService": true,
        "ItemTitle": "sample string 10",
        "Options": [
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          },
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          }
        ]
      },
      {
        "TaxCostInclusive": true,
        "UseChannelTax": true,
        "PricePerUnit": 3.1,
        "Qty": 4,
        "TaxRate": 5.1,
        "LineDiscount": 6.1,
        "ItemNumber": "sample string 7",
        "ChannelSKU": "sample string 8",
        "IsService": true,
        "ItemTitle": "sample string 10",
        "Options": [
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          },
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          }
        ]
      }
    ],
    "ExtendedProperties": [
      {
        "Name": "sample string 1",
        "Value": "sample string 2",
        "Type": "sample string 3"
      },
      {
        "Name": "sample string 1",
        "Value": "sample string 2",
        "Type": "sample string 3"
      }
    ],
    "Notes": [
      {
        "Note": "sample string 1",
        "NoteEntryDate": "2018-02-19T16:57:06.3501736+00:00",
        "NoteUserName": "sample string 3",
        "Internal": true
      },
      {
        "Note": "sample string 1",
        "NoteEntryDate": "2018-02-19T16:57:06.3501736+00:00",
        "NoteUserName": "sample string 3",
        "Internal": true
      }
    ],
    "Source": "sample string 11",
    "SubSource": "sample string 12",
    "ChannelBuyerName": "sample string 13",
    "ReferenceNumber": "sample string 14",
    "ExternalReference": "sample string 15",
    "SecondaryReferenceNumber": "sample string 16",
    "Currency": "sample string 17",
    "ConversionRate": 18.1,
    "ReceivedDate": "2018-02-19T16:57:06.3511754+00:00",
    "DispatchBy": "2018-02-19T16:57:06.3511754+00:00",
    "PaidOn": "2018-02-19T16:57:06.3511754+00:00",
    "PostalServiceCost": 22.1,
    "PostalServiceTaxRate": 23.1,
    "PostalServiceDiscount": 24.1,
    "Discount": 25.1,
    "DiscountType": "AllEvenly",
    "BillingAddress": {
      "MatchCountryCode": "sample string 1",
      "MatchCountryName": "sample string 2",
      "FullName": "sample string 3",
      "Company": "sample string 4",
      "Address1": "sample string 5",
      "Address2": "sample string 6",
      "Address3": "sample string 7",
      "Town": "sample string 8",
      "Region": "sample string 9",
      "PostCode": "sample string 10",
      "Country": "sample string 11",
      "PhoneNumber": "sample string 12",
      "EmailAddress": "sample string 13",
      "isEmpty": false
    },
    "DeliveryAddress": {
      "MatchCountryCode": "sample string 1",
      "MatchCountryName": "sample string 2",
      "FullName": "sample string 3",
      "Company": "sample string 4",
      "Address1": "sample string 5",
      "Address2": "sample string 6",
      "Address3": "sample string 7",
      "Town": "sample string 8",
      "Region": "sample string 9",
      "PostCode": "sample string 10",
      "Country": "sample string 11",
      "PhoneNumber": "sample string 12",
      "EmailAddress": "sample string 13",
      "isEmpty": false
    }
  },
  {
    "UseChannelTax": true,
    "AutomaticallyLinkBySKU": true,
    "Site": "sample string 3",
    "MatchPostalServiceTag": "sample string 4",
    "PostalServiceName": "sample string 5",
    "SavePostalServiceIfNotExist": true,
    "MatchPaymentMethodTag": "sample string 7",
    "PaymentMethodName": "sample string 8",
    "SavePaymentMethodIfNotExist": true,
    "MappingSource": "sample string 10",
    "OrderState": "None",
    "PaymentStatus": "Unpaid",
    "OrderItems": [
      {
        "TaxCostInclusive": true,
        "UseChannelTax": true,
        "PricePerUnit": 3.1,
        "Qty": 4,
        "TaxRate": 5.1,
        "LineDiscount": 6.1,
        "ItemNumber": "sample string 7",
        "ChannelSKU": "sample string 8",
        "IsService": true,
        "ItemTitle": "sample string 10",
        "Options": [
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          },
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          }
        ]
      },
      {
        "TaxCostInclusive": true,
        "UseChannelTax": true,
        "PricePerUnit": 3.1,
        "Qty": 4,
        "TaxRate": 5.1,
        "LineDiscount": 6.1,
        "ItemNumber": "sample string 7",
        "ChannelSKU": "sample string 8",
        "IsService": true,
        "ItemTitle": "sample string 10",
        "Options": [
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          },
          {
            "Property": "sample string 1",
            "Value": "sample string 2"
          }
        ]
      }
    ],
    "ExtendedProperties": [
      {
        "Name": "sample string 1",
        "Value": "sample string 2",
        "Type": "sample string 3"
      },
      {
        "Name": "sample string 1",
        "Value": "sample string 2",
        "Type": "sample string 3"
      }
    ],
    "Notes": [
      {
        "Note": "sample string 1",
        "NoteEntryDate": "2018-02-19T16:57:06.3501736+00:00",
        "NoteUserName": "sample string 3",
        "Internal": true
      },
      {
        "Note": "sample string 1",
        "NoteEntryDate": "2018-02-19T16:57:06.3501736+00:00",
        "NoteUserName": "sample string 3",
        "Internal": true
      }
    ],
    "Source": "sample string 11",
    "SubSource": "sample string 12",
    "ChannelBuyerName": "sample string 13",
    "ReferenceNumber": "sample string 14",
    "ExternalReference": "sample string 15",
    "SecondaryReferenceNumber": "sample string 16",
    "Currency": "sample string 17",
    "ConversionRate": 18.1,
    "ReceivedDate": "2018-02-19T16:57:06.3511754+00:00",
    "DispatchBy": "2018-02-19T16:57:06.3511754+00:00",
    "PaidOn": "2018-02-19T16:57:06.3511754+00:00",
    "PostalServiceCost": 22.1,
    "PostalServiceTaxRate": 23.1,
    "PostalServiceDiscount": 24.1,
    "Discount": 25.1,
    "DiscountType": "AllEvenly",
    "BillingAddress": {
      "MatchCountryCode": "sample string 1",
      "MatchCountryName": "sample string 2",
      "FullName": "sample string 3",
      "Company": "sample string 4",
      "Address1": "sample string 5",
      "Address2": "sample string 6",
      "Address3": "sample string 7",
      "Town": "sample string 8",
      "Region": "sample string 9",
      "PostCode": "sample string 10",
      "Country": "sample string 11",
      "PhoneNumber": "sample string 12",
      "EmailAddress": "sample string 13",
      "isEmpty": false
    },
    "DeliveryAddress": {
      "MatchCountryCode": "sample string 1",
      "MatchCountryName": "sample string 2",
      "FullName": "sample string 3",
      "Company": "sample string 4",
      "Address1": "sample string 5",
      "Address2": "sample string 6",
      "Address3": "sample string 7",
      "Town": "sample string 8",
      "Region": "sample string 9",
      "PostCode": "sample string 10",
      "Country": "sample string 11",
      "PhoneNumber": "sample string 12",
      "EmailAddress": "sample string 13",
      "isEmpty": false
    }
  }
]&location=sample string 1

Response

This is an example response. Results may vary depending on your data.

[
  "58f2c1c4-22ef-4167-95f5-2374c393ca73",
  "b5e6ec92-09b7-4ea2-8b59-8c7b061050ee"
]