Order Management
Order completion, cancellation, and modification endpoints
Retrieves the details of a completed order for the authenticated user.
Business Logic:
Requires authentication. The order must belong to the logged-in user.
Validates the signed order number.
The signature is time-limited for security.
Response Format:
Default: HTML page rendering order confirmation.
JSON: Add
?format=jsonquery parameter.
Signed order number (time-limited signature for security).
Response format. Use json for JSON response.
Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789Order details
HTML page with order confirmation.
Authentication required
Order not found, signature expired, or does not belong to user
Directly cancels selected order items and sends the cancellation to the order management system (Omnitron).
How It Works:
This endpoint attempts direct cancellation without creating CancellationRequest records. The selected order items are immediately cancelled and reported to Omnitron.
Validates that the order belongs to the authenticated user.
Checks all cancellation rules (status, time limits, invoice status, etc.).
Retrieves the order details from Omnitron.
Sends the cancellation request directly to Omnitron API.
Updates the order item statuses to
cancellation_waiting.
Fallback Behavior:
If direct cancellation fails for any reason (validation error, Omnitron API error, etc.), the system automatically creates CancellationRequest records instead. In this case, the response will be 200 OK with the created CancellationRequest list.
Cancellation Validation Rules:
The following conditions are checked before allowing cancellation:
Order is already cancelled
"Order already cancelled!"
Cancellation already in progress
"Order cancellation already in progress."
Order status doesn't allow cancellation
"Order can't be cancelled in this status."
Order has invoice (if configured)
"Invoiced orders can not cancel"
Time limit exceeded (if configured)
"Order cancellation expired."
Item status doesn't allow cancellation
"Order Item ({name}) can't be cancelled in this status."
Cancellable Order Statuses (Default):
payment_waitingconfirmation_waitingapproved
Additional statuses can be configured via EXTRA_CANCEL_RULES setting.
Configuration (Dynamic Settings):
EXTRA_CANCEL_RULES.extra_direct_cancellable_statuses
Additional order statuses that allow direct cancellation
EXTRA_CANCEL_RULES.has_invoice
If true, orders with invoice cannot be cancelled
EXTRA_CANCEL_RULES.hour_gap.is_active
If true, enables time-based cancellation limit
EXTRA_CANCEL_RULES.hour_gap.time
Time limit in minutes after order creation (default: 60)
Response:
204: Direct cancellation successful - order items cancelled and sent to Omnitron.200: Direct cancellation failed - CancellationRequest records created as fallback.400: Validation error - cancellation not allowed.
The order number to cancel.
ORD-2024-001234CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789Request payload for cancelling order items. Contains a list of items to cancel with their individual cancellation details.
Address ID for product pickup (for easy return / refund requests). Must be a valid address belonging to the authenticated user. Only required for refund-type cancellations with easy return enabled.
If true, the refund amount will be credited as loyalty points
instead of being refunded to the original payment method.
falseDirect cancellation failed - CancellationRequest records created as fallback. Returns the list of created CancellationRequest records that will be processed by the back-office.
Direct cancellation successful.
The cancellation has been sent to Omnitron and order item statuses are updated to cancellation_waiting.
Validation error - cancellation not allowed
Authentication required
Order not found or does not belong to user
Submits a request to change the delivery address for an existing order.
Business Logic:
Validates that the order and address belong to the authenticated user.
Sends the address change request to the order management system (Omnitron).
The request may be subject to approval based on order status.
Restrictions:
Cannot change address for orders that have already been shipped.
The new address must be a valid address from the user's address book.
Error Code: order_100_3 - Old order address cannot be changed (order already shipped).
CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.
abc123def456ghi789Session ID and CSRF token cookies.
Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>
sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789The ID of the order to update.
The ID of the new address from the user's address book.
Channel ID (optional, populated automatically).
Address change request submitted successfully to Omnitron.
Validation error
Authentication required
Last updated
Was this helpful?

