Update a Standing Order
Use this method to update a Standing Order.
Valid Tokens: Company and Customer.
Related Articles
-
Delete a Prebook 1.0 (API)
-
-
-
Add Inventory (API)
-
Request
URL: https://api.kometsales.com/api/v2/standing-order
Method: PUT
Content-Type: Application/JSON
Header
authenticationToken (required)(string:50)
Komet Sales security token.
Input parameters
customerId (required if customerCode
is not sent)(integer:20)
Customer ID.
You can get this value from the customer.list API method.
customerCode (required if customerId
is not sent)(string:20)
Customer code.
customerDescription (required if customerId
is not sent)(string:200)
Customer name.
carrierId (required if carrierCode
is not sent)(integer:20)
Carrier ID.
You can get this value from the carrier.list API method.
carrierCode (required if carrierId
is not sent)(string:20)
Carrier code.
carrierDescription (required if carrierId
is not sent)(string:200)
Carrier name.
startDate (required)(date)
Standing Order starting date.
Date format: YYYY-MM-DD
endDate (optional)(date)
Standing Order end date.
Date format: YYYY-MM-DD
standingOrderID (required)(integer:20)
Komet Sales internal Standing Order ID.
You can get this value from the standing-order.create API method.
standingOrderItemId (required)(integer:20)
Standing Order ID.
shipViaId (logical)(integer:1)
Ship Via ID.
Valid values: 0 = Warehouse | 1 = Grower
shipToId (optional)(integer:200)
Ship-To number ID.
You can get this ID by using the customer.shipto.list method.
customerPO (optional)(string:20)
Customer Purchase Order number.
companyLocationId (optional)(string:20)
Location ID.
Only Applies to Multi-Location Companies.
companyLocationCode (required)(string:20)
Location code.
Only applies to Multi-Location Companies.
recurrence (required)(number)
Standing Order frequency of Purchase Order generation in weeks.
Valid range: 1-4
truckDays (required)(string:20)
Truck Days for the Purchase Orders.
Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday.
comments (optional)(string:200)
Special instructions or comments.
invoiceNotes (optional)(string:1000)
Additional notes for the Standing Order.
Maximum 200 characters.
items (optional)(array)
Arrays containing products in the Standing Order.
identifier (optional)(string:30)
Use this parameter to identify product lines and receive equal values in the response.
vendorId (optional)(integer:20)
Vendor or Grower ID.
You can get this value from vendor.list API method.
vendorCode (required if vendorId
is not sent)(string:20)
Vendor or Grower code.
vendorName (required if vendorId
is not sent)(string:200)
Vendor or Grower name.
productId (required if productCode
is not sent)(integer:20)
Product ID.
You can get this value from the product.list API method.
productCode (required if productId
is not sent)(string:20)
Product Code.
productDescription (required if productId
is not sent)(string:200)
Product description.
itemType (optional)(string:3)
Item type.
Valid values: BOX or UN (Unit).
Default is BOX.
boxTypeId (required if boxTypeCode
is not sent and itemType
is BOX)(integer:20)
Box type ID.
You can get this value from the boxtype.list API method.
boxTypeCode (required if boxTypeId
is not given and itemType
is BOX)(string:3)
Box type code.
boxTypeDescription (required if boxTypeId
is not sent and itemType
is BOX)(string:3)
Box type name.
boxes (required if itemType
is BOX)(integer:10)
Amount of boxes.
totalUnits (required if itemType
is UN)(integer:10)
Number of Units.
unitType (required)(string:5)
Unit type.
Valid Values: Stem or Bunch.
bunches (required if itemType
is BOX)(integer:10)
Number of Bunches per Box.
stemsBunch (required if itemType
is BOX)(integer:10)
Stems per Bunch.
Leave this field empty for mixed Boxes.
price (optional)(decimal:10,2)
Weighted Average Unit price.
Use the price according to the selected unitType
.
cost (optional)(decimal:10,2)
Weighted average Unit cost.
Use the cost according to the selected unitType
.
If you are using a Vendor token, the system will accept this field only if the vendor has the Allow changing cost setting enabled.
markCode (optional)(string:50)
Product Mark Code.
generalNotes (optional)(string:1000)
Additional notes.
vendorNotes (optional)(string:1000)
Notes for the Vendor.
customFields (array)
An array containing custom information fields.
name (string)
Name of the custom field.
value (string)
Custom field body.
breakdowns (optional)(array)
An array containing product breakdowns.
identifier (optional)(string:30)
Use this parameter to identify product lines and receive equal values in the response.
productId (required if productCode
is not sent)(integer:20)
Product ID.
You can get this value from the product.list API method.
productCode (required if productId
is not sent)(string:20)
Product code.
productDescription (required if productId
is not sent)(string:200)
Product description.
bunches (required)(integer:10)
Total Bunches per Box.
stemsBunch (required)(integer:10)
Stems per Bunch.
cost (required)(decimal:10,2)
Cost of the product by Unit type.
price (required for tokens type company)(decimal:10,2)
Price of the product by Unit type.
{
"authenticationToken": "token_info_goes_here",
"customerId": "131313",
"customerCode": "Fresh",
"customerDescription": "Mr. Fresh",
"carrierId": "1360",
"carrierCode": "ARM",
"carrierDescription": "Armellini",
"startDate": "2022/04/13",
"endDate": "2022/12/13",
"standingOrderId": 3228,
"shipViaId": "1",
"shipToId": "1313",
"customerPO": "122344",
"companyLocationId": "147",
"companyLocationCode": "MIA",
"recurrence": "1",
"truckDays": "Monday, Wednesday, Friday",
"comments": "Keep it fresh",
"invoiceNotes": "",
"items": [
{
"identifier": "1123",
"vendorId": "33",
"vendorCode": "333",
"vendorName": "33 Flowers",
"productId": "21",
"productCode": "Lucky",
"productDescription": "Black Monstera",
"itemType": "BOX",
"boxTypeId": "HB",
"boxTypeCode": "QB21",
"boxes": "35",
"totalUnits": "777",
"unitType": "Stem",
"bunches": "13",
"stemsBunch": "7",
"price": "1.21",
"cost": "1.01",
"markCode": "BCK",
"generalNotes": "Ship it",
"vendorNotes": "Thank you",
"customFields": [
{
"name": "",
"value": ""
}
],
"breakdowns": [
{
"identifier": "Assorted 1",
"productId": "3",
"productCode": "BK",
"productDescription": "Black King Rose",
"bunches": "13",
"stemsBunch": "13",
"cost": "1.33",
"price": "0.99"
}
]
}
]
}
Response
standingOrderId (integer)
Komet Sales internal Standing Order ID.
standingOrderNumber (integer)
Standing Order number.
message (string:500)
Transaction status description.
items (array)
An array containing updated Standing Order Items.
identifier (string)
ID entered in the request to identify item lines.
status (integer:1)
Transaction status.
Valid values: 1 = Success | 0 = Failure
message (string:500)
Transaction status description.
standingOrderItemId (integer)
Komet Sales internal Standing Order Item ID.
status (integer:1)
Transaction status.
Valid values: 1 = Success | 0 = Failure
{
"standingOrderId": 3228,
"standingOrderNumber": "S03228",
"message": "Item was successfully updated.",
"items": [
{
"identifier": "P001",
"status": 1,
"message": "Item was successfully added.",
"standingOrderItemId": 10611
}
],
"status": 1
}