Skip to main content
OPLOG’s SalesOrder API provides comprehensive order management capabilities for various business scenarios. This guide covers the essential requirements, configurations, and examples for creating different types of sales orders.

Integration Overview

The SalesOrder API is designed to handle multiple business models:
  • E-commerce Integration - Direct website orders with payment processing
  • Marketplace Integration - Orders from platforms like Amazon, Trendyol, etc.
  • B2B Orders - Corporate orders with specialized billing requirements
  • Cross-border Orders - International shipping with currency support
All orders must include unique reference numbers, customer information, and delivery addresses. Optional features like gift services and document attachments enhance the customer experience.

Creating Orders

OPLOG’s SalesOrder POST endpoint has several required fields that you need to be aware of:

Quick Start Requirements

Essential Fields: Reference number, sales channel, customer info, addresses, line items, and payment details are mandatory for all orders.

Core Requirements

Requirements:
  • Unique identifier for each order in OPLOG.ONE system
  • Maximum 30 characters
  • Cannot contain ”_” characters
  • Must be unique across all orders
Examples:
  • "ORD-2025-001"
  • "MOBILE_ORDER_123" ❌ (contains underscore)
  • "VERY_LONG_ORDER_REFERENCE_NUMBER_EXAMPLE" ❌ (exceeds 30 chars)
Purpose: Identifies the platform or channel where the order originatedCommon Values:
  • "Trendyol" - Trendyol marketplace
  • "Web" - Website orders
  • "Mobile App" - Mobile application
  • "mystore.com" - Custom domain/channel
  • "b2b.company.com" - B2B portal
Required Fields:
  • email - Must be unique customer email address
  • firstName - Customer’s first name
  • lastName - Customer’s last name
  • phone - Must start with country code
Phone Format Examples:
  • "+12125551234" ✅ (US)
  • "+905551234567" ✅ (Turkey)
  • "+4915512345678" ✅ (Germany)
  • "5551234567" ❌ (missing country code)

Address Requirements

Address requirements vary by location and order type. Both shipping and billing addresses follow the same structure.
Required Fields (All Locations):
  • addressFirstName - Recipient’s first name
  • addressLastName - Recipient’s last name
  • addressOne - Primary address line
  • city - City name
  • country - Country name
  • addressPhone - Phone number with country code
Location-Specific Requirements:🇹🇷 Turkey:
  • district - Must use specified values from Turkey location list
  • city - Must use specified values from Turkey location list
  • postalCode - Optional
🌍 International:
  • postalCode - Mandatory for all international addresses
  • district - Optional (can be state/province)
Optional Fields:
  • addressTwo - Additional address information
  • company - Company name (for corporate orders)
  • taxOffice - Tax office (for billing addresses in Turkey)
  • taxNumber - Tax number (for corporate billing)
Address fields support ISO 19160 format for international standardization.

Line Items

Each product in the order requires specific information for proper processing.
Required Fields:
  • amountInOrder - Quantity of the product being ordered
    • Must be a positive integer
    • Example: 2 for ordering 2 units
  • sku - Unique product identifier
    • Used to identify the specific product in your catalog
    • Example: "LAPTOP-001", "PHONE-PRO-128GB"
  • currency - ISO 4217 currency code
    • Mandatory for Turkey to international orders
    • Mandatory for COD (Cash on Delivery) orders
    • Examples: "USD", "EUR", "TRY", "GBP"
Optional Fields:
  • productSalePrice - Unit price of the product
    • Used for pricing calculations and invoicing
    • Should match your product catalog pricing
Multiple Products Example:

Payment Options

For COD orders, totalPaymentAmount field is mandatory and must be accurate.
1

Choose Payment Method

Select from Paid, CreditCard, or Cash (COD) based on your business model
2

Set Payment Amount

Ensure totalPaymentAmount matches the order total
3

Specify Currency

Use ISO 4217 currency codes (USD, EUR, TRY, etc.)
Required Fields:
  • paymentOption - Payment method used
  • totalPaymentAmount - Total payment amount
  • currency - Payment currency (ISO 4217 code)
Available Payment Options:“Paid” - Pre-paid orders
  • Order already paid through online payment
  • Most common for e-commerce orders
  • No additional payment collection needed
“CreditCard” - Credit card payments
  • Credit card payment processed
  • Similar to “Paid” but specifically indicates card payment
“Cash” - Cash on delivery (COD)
  • Payment collected upon delivery
  • totalPaymentAmount is mandatory and must be accurate
  • Carrier will collect the specified amount

Marketplace Integration

Marketplace orders require at least one cargo identification method to be processed successfully.
Required Fields:
  • cargoType - Type of delivery service
  • At least one of the following identification methods:
cargoCarrier (Base Method)
  • Specify the shipping carrier company name
  • Common Carriers: "FedEx", "UPS", "DHL", "USPS", "Amazon Logistics"
  • Can be combined with cargoCode or cargoDocumentUrl for enhanced tracking
cargoCarrier + cargoCode (Recommended)
  • Provides both carrier identification and tracking number
  • Alphanumeric tracking code provided by carrier
  • Example formats: "1Z999AA1234567890" (UPS), "1001 2345 6789" (FedEx)
cargoCarrier + cargoDocumentUrl
  • Combines carrier name with documentation link
  • Must be a valid HTTPS URL
  • Should point to publicly accessible tracking information
Standalone Options (Alternative) You can also use cargoCode or cargoDocumentUrl without cargoCarrier:

Cargo Types

Available Cargo Types:“RegularDelivery”
  • Standard shipping service
  • Used for Marketplace and WEB orders
  • Normal delivery timeframes (2-5 business days)
  • Most common cargo type
“SamedayDelivery”
  • Same-day delivery service
  • Available for WEB orders received by 09:00 UTC+0
  • Premium service with same-day fulfillment
  • Limited to supported regions
“ManualDelivery”
  • Direct courier delivery
  • Used when standard cargo companies are not available
  • Manual handling and special delivery arrangements
  • Typically for high-value or fragile items
Selection Guidelines:
  • Use "RegularDelivery" for standard e-commerce orders
  • Use "SamedayDelivery" for urgent orders (before 09:00 UTC)
  • Use "ManualDelivery" for special handling requirements

Value Added Services (VAS)

Gift Services (giftVAS):
Fields:
  • giftWrap - Boolean to enable/disable gift wrapping
  • giftNotes - Single-line gift message for the recipient
Requirements:
  • Gift notes must be single-line (no line breaks)
  • Keep message concise and appropriate
  • Gift wrapping may incur additional fees
Document Services (documentVAS):
Fields:
  • documentUrl - Link to document (warranty, manual, certificate)
Requirements:
  • Must be a publicly downloadable PDF format link
  • HTTPS URL required for security
  • Document should be relevant to the order (warranty, manual, etc.)
Combined VAS Example:
VAS services are optional but enhance customer experience when used appropriately.

Currency Support

Currency information is mandatory for international orders from Turkey. Incorrect currency values are the customer’s responsibility.

Date Format

All date fields use ISO-8601 format as UTC+0.
Example: "2025-06-17T10:13:41.479Z"

Error Handling

Validation Errors

404 Not Found: Mandatory fields missing or invalid values

Business Logic Errors

Blocked Orders: Orders may be blocked due to insufficient stock
Always validate required fields locally before API submission to avoid common errors.

Order Examples

Most common order type with pre-paid payment and regular delivery.
Order where payment is collected upon delivery.
Order with marketplace-specific shipping information.
B2B order with company information and tax details.
Cross-border order with postal code requirements.
Order with gift wrapping and value-added services.

TAG Management

OPLOG.ONE’s TAG management system provides flexible metadata tagging capabilities across various business entities. Organizations can attach custom labels to records, transforming basic data into actionable intelligence for better workflow optimization. The system proves valuable for both operational efficiency and analytics. Teams can quickly identify and process records based on specific criteria - staff can locate items requiring special handling, managers can prioritize high-value transactions, and leadership can analyze performance metrics across different categories. This flexible approach eliminates rigid classification systems, allowing businesses to evolve their tagging strategies as operational needs change.

TAG Best Practices for Sales Orders

Sales Team Assignment

Track sales team members and assignments: sales-team-member, account-manager, lead-source

Order Type

Categorize by type: b2b, retail, wholesale, gift-order

Source Tracking

Track order sources: website, mobile-app, marketplace, phone

Special Handling

Mark special requirements: fragile, expedited, white-glove
TAG Usage Examples:
  • Sales Team Tags: sales-team-member,account-manager,lead-source
  • Source Tags: amazon,trendyol,website,mobile-app
  • Special Tags: gift-wrap,international,b2b,wholesale
  • Processing Tags: reviewed,approved,on-hold,expedited
TAG management for sales orders enables enhanced order tracking, custom workflows, and detailed analytics based on your business requirements.