White Server White Server White Server API White Server API v2 Description of Methods Current: CompleteOrder CompleteOrder PurposeCompletes the order if the prepayment made is equal to the order amount.After executing this command, the paid order becomes unavailable for editing.Request typeasynchronous/synchronousSupported agent versionv2PluggetSystemTypeRKMidRequest formatJSON{ "taskType": "CompleteOrder", "params": { "async": { "objectId": number, "timeout": number }, "sync": { "objectId": number, "timeout": number }, "orderGuid": "guid" }}ParameterTypeMandatoryDescriptiontaskTypestringyesTask type-asyncAsynchronous method call: either synchronous or asynchronous-syncSynchronous method call: either synchronous or asynchronous--timeoutintnoAgent response timeout in seconds, default is 120 seconds--objectIdintyesRestaurant code in the licensing system-orderGuidguidyesGuid of the order for which payment is requiredSynchronous response formatJSON{ "responseCommon":{ "taskGuid":"guid", "taskType":"CompleteOrder", "objectId": number }, "error":{ "wsError":{ "code":"string", "desc":"string" } }}ParameterTypeDescription-taskGuidguidUnique code of this task, used when receiving a task through the queue-taskTypestring enumTask type-objectIdintRestaurant code in the licensing systemerrorError container, for more details see the article Error DescriptionAsynchronous response format// A successful response means that the paid order has been verified and completed; it cannot be changed now.{ "taskResponse": { "order": { "price": { "total": number, } } }, "responseCommon": { "taskGuid": "string", "taskType": "CompleteOrder", "objectId": number }} // Response with an error{ "responseCommon": { "taskGuid": "string", "taskType": "CompleteOrder", "objectId": number }, "error": { "wsError": { "code": "string", "desc": "string" }, "agentError": { "code": "string", "desc": "string" } }}ParameterParameter typeMandatoryDescriptionorderyesprice.totalmoneyyesTotal cost of the ordererrorstring enumError container, for more details see the article Error Description-wsErrorstring enumWhiteserver Error--codestringError code--descstringError description-agentErrorstring enumError from agent--codestringIn addition to the existing ones, the following error codes will appear (in numbers in the old agent):valuedescriptionOrderIsLockedthe order is blockedOrderIsClosedthe order is closedPaymentIsMoreThanTotalPricepayment transferred is more than the order value--descstringError description ×