Add a coupon to a specific order
Name | Type | Description |
---|---|---|
orderId | Guid | Order id |
barcode | String | Coupon barcode |
couponData | CouponValidationResult | Coupon data |
fulfilmentCenter | Guid | Current fulfilment center |
The following request format is required for this method.
POST https://eu-ext.linnworks.net/api/Orders/AddCoupon
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
This is an example of the request structure. Results will vary depending on your data.
orderId=989e3ea9-edc6-41b4-bddc-a766be3ca45d&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=cdf848ab-3bce-4d2a-82da-8dc68af9db07
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": "4863d883-e804-4b18-abb0-f6bc1db5c31c",
"ProfitMargin": 9.1,
"TotalDiscount": 10.1,
"Currency": "sample string 11",
"CountryTaxRate": 12.1,
"ConversionRate": 13.1
},
"Item": {
"ItemId": "45872db8-9346-4395-bb30-a6e9e6894e51",
"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": "dd1fd629-4ab3-4205-aa2f-7a3f3771f4b7",
"Rowid": "9f27d2a1-69e0-4a38-95bd-7e3a4b856a91",
"pkPurchaseId": "99f5418c-95d3-4a15-8c64-caafeaea037c",
"ExternalInvoiceNumber": "sample string 4",
"fkSupplierId": "d66848aa-7321-4c91-bfc0-feb6f44e09bc",
"DateOfDelivery": "2022-03-09T13:04:14.143844+00:00",
"QuotedDeliveryDate": "2022-03-09T13:04:14.143844+00:00",
"SupplierName": "sample string 8",
"fkLocationId": "7fb302f5-8fd2-48fd-9556-4c53bea35073"
},
"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": "45fad81a-e527-402d-b114-313ec3362e1d",
"AdditionalInfo": [
{
"pkOptionId": "04461320-7bd3-45ba-8a2a-67b10c084afb",
"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": "c7019250-34ed-4410-bb33-dce22bfc4a00",
"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": "e3a2a052-b52a-40f0-95a3-9f2f607e3fcd",
"LogicalDelete": true
}
],
"RowId": "98cf127c-6d91-4f72-b32f-25ca21e34c7d",
"OrderId": "f04ff6c9-25da-4b42-9446-6b4336fe59da",
"StockItemId": "ba72db20-0756-4154-8325-9979a4a450af"
},
"ItemWeight": 1.1,
"TotalWeight": 2.1
}