- LIGHTHOUSE Rest API Walkthrough
- Lighthouse APIs
- Authentication
- TransactionStatus
- xcAssetDetail
- Shopping Cart
- xcAuthorizedProduct
- xcCFAMapping
- xcCFAMaster
- xcCFAStock
- xcDistributorDetail
- xcGetPromotionDetail
- xcHSNMaster
- xcJourneyPlan
- xcSubDistributorMargin
- xcOrganizationHierarchy
- xcGetOrganizationHierarchy
- xcOutlet
- xcOutletPriceMapping
- xcPricingControl
- xcPricingPlan
- xcProduct
- xcRouteDetail
- xcTerritoryHierarchy
- xcUserList
- xdARCollection
- xdAROpenItems
- xdCreditDebitNote
- xdCreditDetails
- xdDMSARCollection
- xdEmptieDispatchAdvice
- xdGetPurchaseOrder
- xdGRNDetails
- xdLocationCreditDetails
- xdOpenItems
- xdPendingInvoice
- xdPoFillRate
- xdPOStatus
- xdProduct
- xdPromotion
- xdPurchaseInvoice
- xdSalesInvoice
- xdSalesOrder
- xdSalesOrderStatusUpdate
- xdSalesReturn
- xdStockTransfer
- xdWarehouseStock
- xdInterDTStockIn
- xdInterDTStockOut
- xdGetPOShoppingCart
- xdReturnOrder
- xdDMSStockAdjustment
- xcDistributorPriceMapping
- xdLocationDetails
- xdBeatDetails
- xdVehicleDetails
- xdHHTMaster
- xdPricingPlan
- xdPrimaryPrice
- xdAuthorizedProduct
- xdWarehouseInventory
- xdCustomerMaster
- xdPromotionDefinition
- xdJourneyPlan
- xdRouteSetupV2
- xdCustomerTarget
- xdRouteTarget
- xdSalesInvoice
- xdSchemeAchievement
- xdVanLoad
- xdVanStock
- xdOrderHistoryV1
- xnBeatMaster
- xdSupervisorDetails
- xnRouteSetup
- xdVisitSummaryList
- xdGetNewCustomerRequest
- xdCustomerInventory
- xdGetUploadSyncKeys
- xdGetLoadRequest
- xdGetCustomerGeoCode
- xdDMSVanOffLoad
- xdGetRetailerContactInfo
- xdRouteSetupV2
- xdGetSalesman
- xdCustomer
- xdSetLoadRequest
- xdLoadOut
- xdLoadOutStatus
- xcPromotion
- xcProductHierarchy
- xdIQData
- xdSetReturnHistoryV1
- xdSetDNPlanInfo
- xnJourneyPlanTemplate
- xdGetBeatMaster
- xcGetListSchemes
- xcGetSchemeIsDuplicate
- xcUpdateShortClosure
- xcCreateScheme
- xcGetListBundleSchemes
- xdPODURL
- xdGetPromoAccrualDetails
- xcExclusionList
- xdProductMaster
- TerritoryRoute
- TerritoryRoute Copy
/api/xd/1.0/set_sales_order
POST
/api/xd/1.0/set_sales_order
xdSalesOrder
Request
Body Params application/json
sales_order
array [object {35}]
required
principle_code
string
optional
<= 24 characters
tenant_code
string
optional
<= 12 characters
location_code
string
optional
<= 12 characters
document_number
string
optional
<= 20 characters
document_date
string <date-time>
optional
scheduled_delivery_date
string <date-time>
optional
journey_date
string <date-time>
optional
fiscal_date
string <date-time>
optional
customer_code
string
optional
<= 12 characters
division_code
string
optional
<= 12 characters
salesman_code
string
optional
<= 12 characters
route_code
string
optional
<= 12 characters
net_off_amount
number <float>
optional
document_amount
number <float>
optional
currency_code
string
optional
<= 5 characters
sales_description
string
optional
<= 200 characters
beat_code
string
optional
<= 12 characters
bill_to_customer
string
optional
<= 12 characters
po_number
string
optional
<= 50 characters
order_status
integer
optional
source_of_data
integer
optional
coupon_source
string
optional
<= 50 characters
coupon_code
string
optional
<= 50 characters
coupon_amount
number <float>
optional
coupon_type
integer
optional
calculation_method
integer
optional
coupon_min_buy
number <float>
optional
order_type
integer
optional
payment_terms
string
optional
<= 12 characters
delivery_instructions
string
optional
<= 200 characters
source_tag
string
optional
<= 10 characters
so_creation_sr_code
string
optional
<= 100 characters
so_creation_sr_name
string
optional
<= 500 characters
sales_order_detail
array [object {20}]
optional
sales_order_promo_detail
array [object {8}]
optional
Example
{
"sales_order": [
{
"principle_code": "string",
"tenant_code": "string",
"location_code": "string",
"document_number": "string",
"document_date": "2024-05-20T06:52:11.794Z",
"scheduled_delivery_date": "2024-05-20T06:52:11.794Z",
"journey_date": "2024-05-20T06:52:11.794Z",
"fiscal_date": "2024-05-20T06:52:11.794Z",
"customer_code": "string",
"division_code": "string",
"salesman_code": "string",
"route_code": "string",
"net_off_amount": 0,
"document_amount": 0,
"currency_code": "string",
"sales_description": "string",
"beat_code": "string",
"bill_to_customer": "string",
"po_number": "string",
"order_status": 0,
"source_of_data": 0,
"coupon_source": "string",
"coupon_code": "string",
"coupon_amount": 0,
"coupon_type": 0,
"calculation_method": 0,
"coupon_min_buy": 0,
"order_type": 0,
"payment_terms": "string",
"delivery_instructions": "string",
"source_tag": "string",
"so_creation_sr_code": "string",
"so_creation_sr_name": "string",
"sales_order_detail": [
{
"tenant_code": "string",
"location_code": "string",
"document_number": "string",
"sequence_number": 0,
"item_code": "string",
"item_quantity": 0,
"item_quantity_1": 0,
"item_quantity_2": 0,
"item_price": 0,
"item_excise_tax": 0,
"net_unit_price": 0,
"item_total_promotion": 0,
"line_net_amount": 0,
"is_free_good": 0,
"confirmed_order_quantity": 0,
"mrp": 0,
"coupon_code": "string",
"coupon_type": 0,
"coupon_amount": 0,
"promo_coupon_indicator": "string"
}
],
"sales_order_promo_detail": [
{
"item_code": "string",
"promotion_code": "string",
"promotion_quantity": 0,
"promotion_amount": 0,
"promotion_amount_with_tax": 0,
"promotion_indicator": "string",
"condition_type": "string",
"promo_coupon_indicator": "string"
}
]
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://testapi.com/api/xd/1.0/set_sales_order' \
--header 'Content-Type: application/json' \
--data-raw '{
"sales_order": [
{
"principle_code": "string",
"tenant_code": "string",
"location_code": "string",
"document_number": "string",
"document_date": "2024-05-20T06:52:11.794Z",
"scheduled_delivery_date": "2024-05-20T06:52:11.794Z",
"journey_date": "2024-05-20T06:52:11.794Z",
"fiscal_date": "2024-05-20T06:52:11.794Z",
"customer_code": "string",
"division_code": "string",
"salesman_code": "string",
"route_code": "string",
"net_off_amount": 0,
"document_amount": 0,
"currency_code": "string",
"sales_description": "string",
"beat_code": "string",
"bill_to_customer": "string",
"po_number": "string",
"order_status": 0,
"source_of_data": 0,
"coupon_source": "string",
"coupon_code": "string",
"coupon_amount": 0,
"coupon_type": 0,
"calculation_method": 0,
"coupon_min_buy": 0,
"order_type": 0,
"payment_terms": "string",
"delivery_instructions": "string",
"source_tag": "string",
"so_creation_sr_code": "string",
"so_creation_sr_name": "string",
"sales_order_detail": [
{
"tenant_code": "string",
"location_code": "string",
"document_number": "string",
"sequence_number": 0,
"item_code": "string",
"item_quantity": 0,
"item_quantity_1": 0,
"item_quantity_2": 0,
"item_price": 0,
"item_excise_tax": 0,
"net_unit_price": 0,
"item_total_promotion": 0,
"line_net_amount": 0,
"is_free_good": 0,
"confirmed_order_quantity": 0,
"mrp": 0,
"coupon_code": "string",
"coupon_type": 0,
"coupon_amount": 0,
"promo_coupon_indicator": "string"
}
],
"sales_order_promo_detail": [
{
"item_code": "string",
"promotion_code": "string",
"promotion_quantity": 0,
"promotion_amount": 0,
"promotion_amount_with_tax": 0,
"promotion_indicator": "string",
"condition_type": "string",
"promo_coupon_indicator": "string"
}
]
}
]
}'
Responses
🟢200Success
application/json
Body
status
integer <int32>
optional
message
string | null
optional
transaction_id
string <uuid>
optional
record_count
integer <int32>
optional
Example
{
"status": 0,
"message": "string",
"transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",
"record_count": 0
}
Modified at 2024-11-06 04:45:46