Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

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

GET | 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=1c1869bb-329b-4de0-9fec-f493eab671cc&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=9a1fd161-e76f-4a05-93c6-76cf5b100532

Response

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

{
  "TotalsInfo": {
    "Subtotal": 2.1,
    "PostageCost": 3.1,
    "PostageCostExTax": 4.1,
    "Tax": 5.1,
    "TotalCharge": 6.1,
    "PaymentMethod": "sample string 7",
    "PaymentMethodId": "bc8fbe3a-2cf5-4554-923b-3b37191558a4",
    "ProfitMargin": 9.1,
    "TotalDiscount": 10.1,
    "Currency": "sample string 11",
    "CountryTaxRate": 12.1,
    "ConversionRate": 13.1
  },
  "Item": {
    "ItemId": "c9f8445a-b15d-4404-89eb-60112cb242ae",
    "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": "1155101a-d059-4a3b-bdce-ea5be2474bdc",
      "Rowid": "b8e9ea6b-6541-40f2-9a9d-825da0132714",
      "pkPurchaseId": "6276f5c8-e5f5-4cef-858e-86b0be6c476d",
      "ExternalInvoiceNumber": "sample string 4",
      "fkSupplierId": "1ff510eb-7925-4e8b-aa0b-ad7f27c0315f",
      "DateOfDelivery": "2023-01-10T13:49:54.3898801+00:00",
      "QuotedDeliveryDate": "2023-01-10T13:49:54.3898801+00:00",
      "SupplierName": "sample string 8",
      "fkLocationId": "f5da2999-0af1-4cd3-9049-ab12f6893776"
    },
    "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": "64e08505-6e61-436e-bfc0-2ba9bdbb28de",
    "AdditionalInfo": [
      {
        "pkOptionId": "1cad98c0-88f6-4395-a23d-e64d2ee30fab",
        "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": "3e6b13b4-4de8-4934-a87e-0b04c5e25640",
        "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": "1c574b70-c064-422d-a93a-33a1cf63a107",
        "LogicalDelete": true
      }
    ],
    "RowId": "62b86e59-a01a-4464-b110-372334c1bb7b",
    "OrderId": "1523dacd-d6b8-4703-a265-a54a36e9fd0e",
    "StockItemId": "f45097cf-d413-411f-a4fc-0dfb3d9a47da"
  },
  "ItemWeight": 1.1,
  "TotalWeight": 2.1
}