Back

Search

Search

Methods

Inventory

Orders

Orders /AddCoupon

Response: UpdateOrderItemResult



Add a coupon to a specific order

Parameters

NameTypeDescription
orderIdGuidOrder id
barcodeStringCoupon barcode
couponDataCouponValidationResultCoupon data
fulfilmentCenterGuidCurrent fulfilment center

HTTP Endpoint

Server /Orders / AddCoupon

Permissions


Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/Orders/AddCoupon 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

orderId=26af689a-4328-4dc3-b72d-d140b3f475f5&barcode=sample string 1&couponData={
  "ValidationText": "sample string 1",
  "DeductVisible": true,
  "DeductText": "sample string 3",
  "BalanceVisible": true,
  "BalanceText": "sample string 5",
  "ValueText": "sample string 6",
  "DiscountType": "sample string 7"
}&fulfilmentCenter=d9ec6c5a-0a43-46ef-819b-da3e42620b0e

Response

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

{
  "TotalsInfo": {
    "Subtotal": 1.1,
    "PostageCost": 2.1,
    "Tax": 3.1,
    "TotalCharge": 4.1,
    "PaymentMethod": "sample string 5",
    "PaymentMethodId": "73c09694-0ef8-44f2-9b01-557f71b85319",
    "ProfitMargin": 7.1,
    "TotalDiscount": 8.1,
    "Currency": "sample string 9",
    "CountryTaxRate": 10.1,
    "ConversionRate": 11.1
  },
  "Item": {
    "ItemId": "539eb72a-1d21-474a-b65f-96bb5aa1057f",
    "ItemNumber": "sample string 2",
    "SKU": "sample string 3",
    "ItemSource": "sample string 4",
    "Title": "sample string 5",
    "Quantity": 6,
    "CategoryName": "sample string 8",
    "CompositeAvailablity": 1,
    "StockLevelsSpecified": true,
    "OnOrder": 10,
    "OnPurchaseOrder": {
      "pkPurchaseItemId": "569b0583-cc56-4b4b-9fac-56404a6e8958",
      "Rowid": "c9b09097-24d0-4bf9-a564-eaaa9e1060c0",
      "pkPurchaseId": "8d89f35c-0ece-49b5-a747-bbb3b44eca52",
      "ExternalInvoiceNumber": "sample string 4",
      "fkSupplierId": "46180c0e-678c-4710-b93c-7d310cf7dbe1",
      "DateOfDelivery": "2019-08-21T13:34:06.2458008+01:00",
      "QuotedDeliveryDate": "2019-08-21T13:34:06.2458008+01:00",
      "SupplierName": "sample string 8",
      "fkLocationId": "ebdf7f06-a6fc-498c-b72a-5f03b079b146"
    },
    "InOrderBook": 1,
    "Level": 11,
    "MinimumLevel": 1,
    "AvailableStock": 12,
    "PricePerUnit": 13.1,
    "UnitCost": 14.1,
    "DespatchStockUnitCost": 15.1,
    "Discount": 16.1,
    "Tax": 21.1,
    "TaxRate": 17.1,
    "Cost": 18.1,
    "CostIncTax": 19.1,
    "CompositeSubItems": [
      {
      },
      {
      }
    ],
    "IsService": true,
    "SalesTax": 21.1,
    "TaxCostInclusive": true,
    "PartShipped": true,
    "Weight": 24.1,
    "BarcodeNumber": "sample string 25",
    "Market": 26,
    "ChannelSKU": "sample string 27",
    "ChannelTitle": "sample string 28",
    "DiscountValue": 10.806660973526899,
    "HasImage": true,
    "ImageId": "3ae67944-7f0e-46f8-8d94-4c7b4abc4b3a",
    "AdditionalInfo": [
      {
        "pkOptionId": "f0af10a9-ac31-4d79-8c62-24e3f9b8e65b",
        "Property": "sample string 2",
        "Value": "sample string 3"
      },
      {
      }
    ],
    "StockLevelIndicator": 29,
    "BatchNumberScanRequired": true,
    "SerialNumberScanRequired": true,
    "BinRack": "sample string 32",
    "BinRacks": [
      {
        "Quantity": 1,
        "BinRack": "sample string 2",
        "Location": "7825709b-8a07-4f93-ad7a-9050bf9e8d37",
        "BatchId": 1,
        "OrderItemBatchId": 1
      },
      {
      }
    ],
    "InventoryTrackingType": 33,
    "isBatchedStockItem": false,
    "IsWarehouseManaged": true,
    "HasPurchaseOrders": true,
    "CanPurchaseOrderFulfil": true,
    "IsUnlinked": false,
    "RowId": "5539761c-1957-460b-a848-91ac29191d18",
    "OrderId": "c2d2ca6b-7192-4d57-b7db-8e01d08547c2",
    "StockItemId": "34cb5e6e-1db6-4391-a301-34deef443eef"
  },
  "ItemWeight": 1.1,
  "TotalWeight": 2.1
}