Xnapp Integration APIs
  1. xdSalesOrder
Xnapp Integration APIs
  • LIGHTHOUSE Rest API Walkthrough
  • Lighthouse APIs
    • Authentication
      • /api/1.0/auth
    • TransactionStatus
      • /api/1.0/get_transaction_status
    • xcAssetDetail
      • /api/xc/1.0/set_asset_detail
    • Shopping Cart
      • /api/1.0/shopping_cart
    • xcAuthorizedProduct
      • /api/xc/1.0/set_authorized_product
    • xcCFAMapping
      • /api/xc/1.0/set_cfa_mapping
    • xcCFAMaster
      • /api/xc/1.0/set_cfa_master
    • xcCFAStock
      • /api/xc/1.0/set_cfa_stock
    • xcDistributorDetail
      • /api/xc/1.0/set_distributor
      • /api/xc/1.0/get_distributor
    • xcGetPromotionDetail
      • /api/xc/1.0/get_promotion_detail
    • xcHSNMaster
      • /api/xc/1.0/set_hsn_master
    • xcJourneyPlan
      • /api/xc/1.0/set_journey_plan
      • /api/xc/1.0/get_journey_plan
    • xcSubDistributorMargin
      • /api/xc/1.0/set_journey_plan
      • /api/xc/1.0/get_sub_distributor_margin
    • xcOrganizationHierarchy
      • /api/xc/1.0/set_organization_hierarchy
    • xcGetOrganizationHierarchy
      • /api/xc/1.0/get_organization_hierarchy
    • xcOutlet
      • /api/xc/1.0/get_outlet
      • /api/xc/1.0/set_outlet
    • xcOutletPriceMapping
      • /api/xc/1.0/get_outlet_price_mapping
    • xcPricingControl
      • /api/xc/1.0/set_price
    • xcPricingPlan
      • /api/xc/1.0/get_pricing_plan
    • xcProduct
      • /api/xc/1.0/set_product
      • /api/xc/1.0/get_product
    • xcRouteDetail
      • /api/xc/1.0/set_route
      • /api/xc/1.0/get_route
    • xcTerritoryHierarchy
      • /api/xc/1.0/set_territory_hierarchy
    • xcUserList
      • /api/xc/1.0/set_user_list
    • xdARCollection
      • Central APIs
      • /api/xd/1.0/get_ar_collection
    • xdAROpenItems
      • /api/xd/1.0/set_ar_open_items
    • xdCreditDebitNote
      • /api/xd/1.0/set_credit_debit_note
    • xdCreditDetails
      • /api/xd/1.0/get_credit_details
      • /api/xd/1.0/set_credit_details
    • xdDMSARCollection
      • /api/xd/1.0/set_dms_ar_collection
      • /api/xd/1.0/get_dms_ar_collection
    • xdEmptieDispatchAdvice
      • /api/xd/1.0/get_emptie_dispatch_advice
    • xdGetPurchaseOrder
      • /api/xd/1.0/get_purchase_order
    • xdGRNDetails
      • /api/xd/1.0/get_grn_details
    • xdLocationCreditDetails
      • /api/xd/1.0/set_location_credit
    • xdOpenItems
      • /api/xd/1.0/get_open_items
    • xdPendingInvoice
      • /api/xd/1.0/set_pending_invoice
    • xdPoFillRate
      • /api/xd/1.0/set_po_fill_rate
    • xdPOStatus
      • /api/xd/1.0/set_po_status
    • xdProduct
      • /api/xd/1.0/set_product
    • xdPromotion
      • /api/xd/1.0/get_promotion
    • xdPurchaseInvoice
      • /api/xd/1.0/set_purchase_invoice
    • xdSalesInvoice
      • /api/xd/1.0/get_sales_invoice
    • xdSalesOrder
      • /api/xd/1.0/get_dms_sales_order 
        POST
      • /api/xd/1.0/set_sales_order
        POST
      • /api/xd/1.0/get_sales_order
        POST
      • /api/xd/1.0/get_xo_sales_order
        POST
    • xdSalesOrderStatusUpdate
      • /api/xd/1.0/get_sales_order_status_update
    • xdSalesReturn
      • /api/xd/1.0/get_dms_sales_return
    • xdStockTransfer
      • /api/xd/1.0/get_stock_transfer
    • xdWarehouseStock
      • /api/xd/1.0/get_warehouse_stock
    • xdInterDTStockIn
      • /api/xd/1.0/get_inter_dt_stock_in
    • xdInterDTStockOut
      • /api/xd/1.0/get_inter_dt_stock_out
    • xdGetPOShoppingCart
      • /api/xd/1.0/get_po_shopping_cart
    • xdReturnOrder
      • /api/xd/1.0/set_return_order
    • xdDMSStockAdjustment
      • /api/xd/1.0/get_dms_stock_adjustment
    • xcDistributorPriceMapping
      • /api/xc/1.0/set_distributor_price_mapping
    • xdLocationDetails
      • /api/xd/1.0/set_location_details
    • xdBeatDetails
      • /api/xd/1.0/set_beat_details
    • xdVehicleDetails
      • /api/xd/1.0/set_vehicle_details
      • /api/xd/1.0/get_vehicle_details_ln
    • xdHHTMaster
      • /api/xd/1.0/set_xn_hht_master
    • xdPricingPlan
      • /api/xd/1.0/set_pricing_plan
    • xdPrimaryPrice
      • /api/xd/1.0/set_primary_price
    • xdAuthorizedProduct
      • /api/xd/1.0/set_authorized_product
      • /api/xd/1.0/set_xn_authorized_product
    • xdWarehouseInventory
      • /api/xd/1.0/set_warehouse_inventory
    • xdCustomerMaster
      • /api/xd/1.0/set_customer_master
    • xdPromotionDefinition
      • /api/xd/1.0/set_promotion_definition_v1
    • xdJourneyPlan
      • /api/xd/1.0/set_journey_plan
      • /api/xd/1.0/set_xn_journey_plan
      • /api/xd/1.0/get_journey_plan
    • xdRouteSetupV2
      • /api/xd/1.0/set_route_setup
    • xdCustomerTarget
      • /api/xd/1.0/set_customer_target
    • xdRouteTarget
      • /api/xd/1.0/set_route_target
      • /api/xd/1.0/set_xn_route_target
    • xdSalesInvoice
      • /api/xd/1.0/set_sales_Invoice
      • /api/xd/1.0/set_dms_sales_invoice
    • xdSchemeAchievement
      • /api/xd/1.0/set_scheme_achievement
    • xdVanLoad
      • /api/xd/1.0/set_van_load
    • xdVanStock
      • /api/xd/1.0/set_van_stock
    • xdOrderHistoryV1
      • /api/xd/1.0/set_order_history
    • xnBeatMaster
      • /api/xd/1.0/set_xn_beat_master
    • xdSupervisorDetails
      • /api/xd/1.0/set_xn_supervisor_details
    • xnRouteSetup
      • /api/xd/1.0/set_xn_route_setup
    • xdVisitSummaryList
      • /api/xd/1.0/get_visit_summary_v1
      • /api/xd/1.0/get_visit_summary_v2
    • xdGetNewCustomerRequest
      • /api/xd/1.0/get_new_customer_request
    • xdCustomerInventory
      • /api/xd/1.0/get_customer_inventory
    • xdGetUploadSyncKeys
      • /api/xd/1.0/get_upload_sync_keys
    • xdGetLoadRequest
      • /api/xd/1.0/get_load_request
    • xdGetCustomerGeoCode
      • /api/xd/1.0/get_customer_geo_code
    • xdDMSVanOffLoad
      • /api/xd/1.0/get_van_off_load
    • xdGetRetailerContactInfo
      • /api/xd/1.0/get_retailer_contact_info
    • xdRouteSetupV2
      • /api/xd/1.0/get_route_detail
    • xdGetSalesman
      • /api/xd/1.0/get_Salesman_details
    • xdCustomer
      • /api/xd/1.0/get_customer
    • xdSetLoadRequest
      • /api/xd/1.0/set_load_request
    • xdLoadOut
      • /api/xd/1.0/get_load_out
    • xdLoadOutStatus
      • /api/xd/1.0/set_load_out_status
    • xcPromotion
      • /api/xc/1.0/set_promotion
    • xcProductHierarchy
      • /api/xc/1.0/set_product_hierarchy
      • /api/xc/1.0/get_product_hierarchy
    • xdIQData
      • /api/xd/1.0/set_iq_data
    • xdSetReturnHistoryV1
      • /api/xd/1.0/set_return_history_v1
    • xdSetDNPlanInfo
      • /api/xd/1.0/set_dn_plan_info
    • xnJourneyPlanTemplate
      • /api/xd/1.0/set_xn_journey_plan_template
    • xdGetBeatMaster
      • /api/xd/1.0/get_beat_master
    • xcGetListSchemes
      • /api/xc/1.0/get_list_schemes
    • xcGetSchemeIsDuplicate
      • /api/xc/1.0get_scheme_is_duplicate
    • xcUpdateShortClosure
      • /api/xc/1.0/update_short_closure
    • xcCreateScheme
      • /api/xc/1.0/create_scheme
    • xcGetListBundleSchemes
      • /api/xc/1.0/get_list_bundle_schemes
    • xdPODURL
      • /api/xd/1.0/set_pod_url
    • xdGetPromoAccrualDetails
      • /api/xd/1.0/get_promo_accrual_details
    • xcExclusionList
      • /api/xc/1.0/get_exclusion_list
    • xdProductMaster
      • /api/xd/1.0/set_product_master
    • TerritoryRoute
      • /api/xd/1.0/set_territory_route_book
    • TerritoryRoute Copy
      • /api/xd/1.0/set_territory_route_book
  1. xdSalesOrder

/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
Previous
/api/xd/1.0/get_dms_sales_order 
Next
/api/xd/1.0/get_sales_order
Built with