Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

Orders /AddCoupon

Allows 150 calls per minute

Response: UpdateOrderItemResult



Add a coupon to a specific order

Parameters

NameTypeDescription
orderIdGuidOrder id
barcodeStringCoupon barcode
couponDataCouponValidationResultCoupon data
fulfilmentCenterGuidCurrent fulfilment center

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/Orders/AddCoupon

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

orderId=46b2c8d3-5976-413d-9087-d063e912595b&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=db38cb4c-8015-4aaa-a52f-202c7b4adb5a

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "TotalsInfo": {
    "Subtotal": 2.1,
    "PostageCost": 3.1,
    "Tax": 4.1,
    "TotalCharge": 5.1,
    "PaymentMethod": "sample string 6",
    "PaymentMethodId": "c2a0b13b-821e-4ffe-919f-fa0e592f0163",
    "ProfitMargin": 8.1,
    "TotalDiscount": 9.1,
    "Currency": "sample string 10",
    "CountryTaxRate": 11.1,
    "ConversionRate": 12.1
  },
  "Item": {
    "ItemId": "02937227-f0f4-49a9-a856-e821bd0ed9b3",
    "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": "f34441c8-e4a6-492b-ab79-8f94fc272608",
      "Rowid": "02204548-fa3b-4b11-8253-52508c2c95a5",
      "pkPurchaseId": "bf014db5-1fee-46e8-b491-0a5beea54009",
      "ExternalInvoiceNumber": "sample string 4",
      "fkSupplierId": "3a09e3aa-2263-4aff-b8f7-e9af78fccf3a",
      "DateOfDelivery": "2021-07-29T09:24:51.6938569+01:00",
      "QuotedDeliveryDate": "2021-07-29T09:24:51.6938569+01:00",
      "SupplierName": "sample string 8",
      "fkLocationId": "b5330d89-aebf-4e6c-8c5b-e8f49a543303"
    },
    "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": "a8ed7874-a2c8-4391-93c6-e41e62494b8b",
    "AdditionalInfo": [
      {
        "pkOptionId": "ec4f01d6-384f-43c5-8394-beb576241bad",
        "Property": "sample string 2",
        "Value": "sample string 3"
      }
    ],
    "StockLevelIndicator": 29,
    "ShippingCost": 30.1,
    "PartShippedQty": 31,
    "ItemName": "sample string 32",
    "BatchNumberScanRequired": true,
    "SerialNumberScanRequired": true,
    "BinRack": "sample string 35",
    "BinRacks": [
      {
        "Quantity": 1,
        "BinRack": "sample string 2",
        "Location": "2bd74a8f-31f8-4dd2-acab-54f85cc32ae8",
        "BatchId": 1,
        "OrderItemBatchId": 1
      }
    ],
    "InventoryTrackingType": 36,
    "isBatchedStockItem": false,
    "IsWarehouseManaged": true,
    "IsUnlinked": false,
    "StockItemIntId": 39,
    "Boxes": [
      {
        "BoxId": 1,
        "StockItemIntId": 2,
        "BoxName": "sample string 3",
        "Width": 4.0,
        "Height": 5.0,
        "Length": 6.0,
        "Weight": 7.0,
        "ValuePercentage": 8.0,
        "Barcode": "sample string 9",
        "PackagingTypeId": "f282bda1-0bf4-4082-8fcb-823e09f23057",
        "LogicalDelete": true
      }
    ],
    "RowId": "f88d2afd-1c23-4b43-beaf-58a42957b8b0",
    "OrderId": "23a460ce-c96b-468e-8484-e384c4b57d32",
    "StockItemId": "1fa54d11-c9a5-400c-a462-bb38f3958bc6"
  },
  "ItemWeight": 1.1,
  "TotalWeight": 2.1
}