Order
Create Manual Order
Changed onDescription
Create a manual order in Desty Omnichannel using the authenticated merchant and tenant. This feature is in testing and has not been released to production.
Request rules
- Use the existing Authorization: Bearer <access_token> header. Operator identity is obtained from the authenticated merchant; request-body operator fields are not accepted as the audit identity.
- Use valid tenant warehouse and Master SKU values. Obtain shippingAddress.districtId from /api/region/list.
- shippingAddress.postal, courier, and paymentMethod are required by final order validation.
- Currency is IDR. Send whole-number quantities and amounts where possible. Quantity, paid unit price, shipping fee, and other fees are rounded to integers using HALF_UP.
- Paid unit price cannot exceed the current Master selling price. Item subtotal is the sum of paid unit price × quantity. Order discount cannot exceed that subtotal. Total = subtotal − order discount + shipping fee + other fees.
- Available stock is checked in the selected warehouse, including combined component demand from bundles and standalone items. Reservation and deduction are asynchronous; submission validation is not an immediate stock reservation guarantee.
- The trimmed clientRefNo becomes the order number. Repeated references return DUPLICATE_CLIENT_REF, rather than returning the existing order.
- Customer tags are applied asynchronously. An existing tag name is reused. Tag assignment is skipped when the customer already has 3 tags, or when a new tag is needed and the tenant already has 15 tags; order creation still succeeds.
- For subsequent delivery confirmation, use the existing /api/order/confirmDelivery endpoint.
Request example
Resource identifiers below are placeholders or demo values and must be replaced with valid values for the tenant.
{"clientRefNo":"MANUAL-DEMO-001","customer":{"name":"Demo Customer","phone":"+6281234567890"},"shippingAddress":{"districtId":"<districtId from /api/region/list>","addressDetail":"Demo address","postal":"12345"},"warehouseId":123,"items":[{"masterSku":"DEMO-SKU","quantity":1}],"courier":"Custom courier","paymentMethod":"Bank Payment/Transfer","markOrderAsCompleted":false}
Response example
{"code":"0","msg":null,"data":{"orderId":123456789,"displayedOrderSn":"MANUAL-DEMO-001"},"success":true}
Errors
Business, authentication, and rate-limit errors use HTTP 200 with a non-zero code. Unexpected server exceptions use HTTP 500 with SERVER_ERROR. Always inspect code.
| code | Meaning |
|---|---|
| INVALID_PARAMETER | Missing, malformed, out-of-range, or invalid warehouse/product parameters |
| INVALID_TOKEN | Invalid, expired, or revoked access token |
| LIMIT_REQUEST | Existing request rate limit exceeded |
| DUPLICATE_CLIENT_REF | Reference number already exists within the tenant |
| INVALID_REGION | Invalid shipping district |
| INSUFFICIENT_STOCK | Insufficient available stock in the selected warehouse |
| SERVER_ERROR | Downstream service unavailable or other server error |
post/api/order/manual/create
Request
- Base URLhttps://api.desty.app
- Authnone declared. Required headers: Authorization
Headers
Authorizationstring required
Authorization (Only:Bearer <access_token>)
Request body
Response
successful operation
Changes
- info
endpoint added
- info