Orders
Base URL
/api/v3/admin/orders/order
Authentication
Required permissions for using this API:
- For read operations: No specific permission required
- For update operations:
order:update
- For delete operations: Requires delete policy permission
List Orders
Retrieves a list of orders.
- URL:
/
- Method:
GET
- Query Parameters:
only-trashed
: If true, returns only deleted ordersfilter
: Available filters:id
: Filter by order IDorderNumber
: Filter by order numbercustomerEmail
: Filter by customer emailorderStatus
: Filter by order statuscreateDate
: Filter by creation datecargoCompanyName
: Filter by cargo companydeliveryCity
: Filter by delivery city
include
: Used to include related dataaddress
: Order address informationcustomer
: Customer detailsproducts
: Order productsstore
: Store informationorderReferrers
: Order referrer information
append
: Additional calculated fieldscampaign
: Campaign information
sort
: Sort by field (prefix with - for descending)- Allowed fields: id, orderNumber, createDate, orderTotal, orderStatus, cargoCompanyName, deliveryCity
- Response: Paginated list of orders
Get Single Order
Retrieves a specific order by ID.
- URL:
/{id}
- Method:
GET
- URL Parameters:
id
: Order ID
- Query Parameters:
include
: Used to include related dataaddress
: Order address informationcustomer
: Customer detailsstore
: Store informationrelation_metadata
: Additional metadataorderReferrers
: Order referrer information
append
: Additional calculated fieldscampaign
: Campaign information
filter[trashed]
: Include archived orders
- Response: Order details
Update Order
Updates an existing order.
- URL:
/{id}
- Method:
PUT
- Permissions:
order:update
- URL Parameters:
id
: Order ID
- Request Body:
{
"orderStatus": "preparing", // Order status
"cargoCompanyId": 1, // Cargo company ID
"waybillNumber": "1234567890", // Waybill number
"invoiceNumber": "INV2024001", // Invoice number
"generalOrderNote": "Special note" // General order note
}
- Response: Updated order object
Delete Order
Archives an order.
- URL:
/{id}
- Method:
DELETE
- Permissions: Delete permission required
- URL Parameters:
id
: Order ID
- Response: Archived order object
Batch Operations
Perform operations on multiple orders.
- URL:
/batch
- Method:
POST
- Request Body:
{
"operation": "recover", // Operation type
"filter": { // Filters for selecting orders
"id": [1, 2, 3] // Order IDs to recover
}
}
All Available Fields
Order Information
Field | Type | Description | Required |
---|---|---|---|
orderNumber | string | Order number | Yes |
orderStatus | string | Current status of the order | Yes |
createDate | datetime | Order creation date | Yes |
updateDate | datetime | Last update date | No |
orderCurrency | string | Order currency | Yes |
orderTotal | decimal | Total order amount | Yes |
orderSubtotal | decimal | Subtotal amount | Yes |
orderTax | decimal | Total tax amount | Yes |
Customer Information
Field | Type | Description | Required |
---|---|---|---|
customerId | integer | Customer ID | Yes |
customerFirstName | string | Customer first name | Yes |
customerLastName | string | Customer last name | Yes |
customerEmail | string | Customer email | Yes |
customerPhone | string | Customer phone | Yes |
customerCompany | string | Customer company name | No |
customerGroupId | integer | Customer group ID | No |
customerIp | string | Customer IP address | No |
Payment Information
Field | Type | Description | Required |
---|---|---|---|
paymentMethod | string | Payment method | Yes |
paymentSubMethod | string | Payment sub-method | No |
paymentBankName | string | Bank name | No |
paymentDiscount | decimal | Payment discount amount | No |
installment | integer | Number of installments | No |
ccBrand | string | Credit card brand | No |
ccBank | string | Credit card bank | No |
Shipping Information
Field | Type | Description | Required |
---|---|---|---|
cargoCompanyId | integer | Cargo company ID | No |
cargoCompanyName | string | Cargo company name | No |
cargoNumber | string | Cargo tracking number | No |
cargoTotal | decimal | Total cargo amount | No |
cargoTax | decimal | Cargo tax amount | No |
waybillNumber | string | Waybill number | No |
deliveryDate | datetime | Delivery date | No |
shipmentDate | datetime | Shipment date | No |
Invoice Information
Field | Type | Description | Required |
---|---|---|---|
isInvoiced | boolean | Invoice status | No |
invoiceNumber | string | Invoice number | No |
invoiceDate | datetime | Invoice date | No |
invoiceType | string | Invoice type | No |
isEarchive | boolean | E-archive status | No |
earchiveUuid | string | E-archive UUID | No |
einvoiceLink | string | E-invoice link | No |
System Fields
Field | Type | Description | Required |
---|---|---|---|
isDeleted | boolean | Deletion status | No |
isTransferred | boolean | Transfer status | No |
lastTransferredDate | datetime | Last transfer date | No |
language | string | Order language | No |
application | string | Order source application | No |
generalOrderNote | string | General order note | No |
Error Codes
401
: Authentication error403
: Permission error404
: Order not found422
: Validation errororderStatus.in
: Invalid order statuscargoCompanyId.exists
: Invalid cargo companywaybillNumber.unique
: Waybill number already exists
Changelog
2024-12
- Added filter for viewing orders from Google Ads
2024-09
- Fixed package product content display in order products
- Added metafields model relationships
2024-07
- Enhanced campaign information export in order printing
2024-05
- Improved order products performance
- Added ID number field with eager loading
2024-03
- Implemented order authorization definitions
2024-02
- Added store delivery indication in order details
2024-01
- Implemented order archive functionality
- Fixed campaign information display in order details
2023-12
- Added ability to update order email address
- Enhanced campaign order details
2023-10
- Implemented order archive and recovery services
- Added archive model support for filtering services
2023-09
- Added date/time localization support
- Implemented representative module integration
2023-07
- Implemented API V3 resources
- Added base collection functionality
- Fixed various API V3 issues
2023-06
- Initial release of Order API V3
- Added eager loading filter service support
- Implemented core query builder with sortable fields
This document was generated by AI. For support: api-support@tsoft.com.tr