Orders
User order retrieval and cancellation
Retrieves paginated list of orders for the authenticated user. Includes order items, discounts, addresses, and payment details.
For guest users, returns only the most recent order.
Supports filtering and search by order number.
Session cookie for authentication
Filter orders from last 30 days only
Search by order number
Page number for pagination
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
List of orders
Authentication required
Login required (redirects to login page)
Retrieves detailed information for a specific order. User can only access their own orders.
Guest User Behavior: For guest users, this endpoint ignores the pk parameter and always returns their most recent order (ordered by -pk, first result). This is because guest users are restricted to viewing only their latest order.
Access Control: Users cannot access orders belonging to other users. Attempting to access another user's order returns 404 Not Found.
Response Format:
JSON requests: Returns order data directly
HTML requests: Wraps response in
{"data": {...}}format
Session cookie for authentication
Order ID. Must belong to the authenticated user. For guest users, this parameter is ignored and the most recent order is returned instead.
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
Order details retrieved successfully
Authentication required
Login required (redirects to login page)
Order not found or doesn't belong to user. Guest users with no orders will also receive 404.
Retrieves order information relevant for cancellation. Typically used to display cancellation page/form.
Guest User Behavior: For guest users, this endpoint ignores the pk parameter and always returns their last order (ordered by -created_date, last result). This is because guest users are restricted to viewing only their most recent order for cancellation.
Access Control: Users can only access their own orders. Attempting to access another user's order returns 404 Not Found.
Response Format:
JSON requests: Returns order data directly
HTML requests: Wraps response in
{"data": {...}}format
Session cookie for authentication
Order ID. Must belong to the authenticated user. For guest users, this parameter is ignored and the last order (by created_date) is returned instead.
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
Order cancellation details retrieved successfully
Authentication required
Login required (redirects to login page)
Order not found or doesn't belong to user. Guest users with no orders will also receive 404.
Retrieves paginated list of archived orders. These are typically migrated historical orders from legacy systems.
Guest User Access: Not available for guest users (returns empty list).
Filtering & Search:
Currency filter: Filter by currency type (e.g.,
?currency=tryor?currency=usd)Number search: Search by order number using
searchparameterCustom ordering: Order by any field using
sortparameter
Session cookie for authentication
Filter orders by currency type
Search by order number
Field to order by.
Use - prefix for descending order.
Examples: created_date, -created_date, amount, -number
Available fields: number, user_email, status, created_date, amount,
discount_amount, currency, payment_type, bank, installment_count,
tracking_number, shipping_company, shipping_address, billing_address
-created_datePage number for pagination
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
List of old orders retrieved successfully
Authentication required
Login required (redirects to login page)
Retrieves detailed information for a specific archived order. User can only access their own orders.
Guest User Access: Not available for guest users, returns 404 Not Found for any pk value.
Access Control: Users cannot access orders belonging to other users. Attempting to access another user's order returns 404 Not Found.
Response Format:
JSON requests: Returns order data directly
HTML requests: Wraps response in
{"data": {...}}format
Session cookie for authentication
Old order ID. Must belong to the authenticated user. Guest users will always receive 404.
Session cookie in format sessionid=<value>.
May use site-specific cookie name (e.g., osessionid).
Old order details retrieved successfully
Authentication required
Login required (redirects to login page)
Order not found or doesn't belong to user. Guest users always receive 404 for this endpoint.
Last updated
Was this helpful?

