POST Sales Order using API_SALES_ORDER_SRV

I face some issue on creating Sales Order using API_SALES_ORDER_SRV from External Application (in this case is Dynamics 365 Business Central.

I am trying to create a new sales order from an external application built in Microsoft Dynamics Business Central. I successfully retrieve sales order data using the GET method and the same service endpoint. However, when I attempt to create a new sales order, I receive a “403 Forbidden” error message.

I have verified that the username and password for Basic Authorization are correct, and I have included the X-CSRF-Token in the header of my request. What confuses me is that I can create a new sales order successfully when using Postman.

Could you help me understand why this might be happening?

Here is my GET request in Postman

Here is my POST request in Postman and the payload

payload

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{
"SalesOrderType": "OR",
"SalesOrganization": "SBY",
"DistributionChannel": "SL",
"OrganizationDivision": "SL",
"PriceDetnExchangeRate": "1.00000",
"SoldToParty": "1000347",
"TotalNetAmount": "500.00",
"PurchaseOrderByCustomer": "Test SO (Integration)",
"TransactionCurrency": "USD",
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Palo Alto",
"CustomerAccountAssignmentGroup": "01",
"CustomerGroup": "01",
"CustomerPaymentTerms": "0004",
"to_Item": {
"results": [
{
"SalesOrderItem": "10",
"SalesOrderItemCategory": "TAN",
"SalesOrderItemText": "Barang Ariel",
"PurchaseOrderByCustomer": "Test so",
"Material": "CAU0099",
"RequestedQuantity": "20",
"RequestedQuantityUnit": "PC",
"ConfdDelivQtyInOrderQtyUnit": "2",
"NetAmount": "500.00",
"MaterialGroup": "L004",
"ProductionPlant": "GON",
"StorageLocation": "GON1",
"ShippingPoint": "GOSP",
"DeliveryPriority": "1",
"DeliveryDateQuantityIsFixed": false,
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Palo Alto",
"IncotermsLocation1": "Palo Alto",
"MatlAccountAssignmentGroup": "03",
"CustomerPaymentTerms": "0004",
"CustomerGroup": "01",
"ProfitCenter": "MJK",
"Subtotal1Amount": "500.00",
"Subtotal2Amount": "500.00",
"Subtotal3Amount": "500.00",
"to_PricingElement": {
"results": [
{
"ConditionType": "PPR0",
"ConditionRateValue": "500.00",
"ConditionCurrency": "USD",
"ConditionQuantity": "20",
"ConditionQuantityUnit": "PC"
}
]
}
}
]
}
}
</code>
<code>{ "SalesOrderType": "OR", "SalesOrganization": "SBY", "DistributionChannel": "SL", "OrganizationDivision": "SL", "PriceDetnExchangeRate": "1.00000", "SoldToParty": "1000347", "TotalNetAmount": "500.00", "PurchaseOrderByCustomer": "Test SO (Integration)", "TransactionCurrency": "USD", "IncotermsClassification": "EXW", "IncotermsTransferLocation": "Palo Alto", "CustomerAccountAssignmentGroup": "01", "CustomerGroup": "01", "CustomerPaymentTerms": "0004", "to_Item": { "results": [ { "SalesOrderItem": "10", "SalesOrderItemCategory": "TAN", "SalesOrderItemText": "Barang Ariel", "PurchaseOrderByCustomer": "Test so", "Material": "CAU0099", "RequestedQuantity": "20", "RequestedQuantityUnit": "PC", "ConfdDelivQtyInOrderQtyUnit": "2", "NetAmount": "500.00", "MaterialGroup": "L004", "ProductionPlant": "GON", "StorageLocation": "GON1", "ShippingPoint": "GOSP", "DeliveryPriority": "1", "DeliveryDateQuantityIsFixed": false, "IncotermsClassification": "EXW", "IncotermsTransferLocation": "Palo Alto", "IncotermsLocation1": "Palo Alto", "MatlAccountAssignmentGroup": "03", "CustomerPaymentTerms": "0004", "CustomerGroup": "01", "ProfitCenter": "MJK", "Subtotal1Amount": "500.00", "Subtotal2Amount": "500.00", "Subtotal3Amount": "500.00", "to_PricingElement": { "results": [ { "ConditionType": "PPR0", "ConditionRateValue": "500.00", "ConditionCurrency": "USD", "ConditionQuantity": "20", "ConditionQuantityUnit": "PC" } ] } } ] } } </code>
{
    "SalesOrderType": "OR",
    "SalesOrganization": "SBY", 
    "DistributionChannel": "SL", 
    "OrganizationDivision": "SL", 
    "PriceDetnExchangeRate": "1.00000",
    "SoldToParty": "1000347", 
    "TotalNetAmount": "500.00",
    "PurchaseOrderByCustomer": "Test SO (Integration)",
    "TransactionCurrency": "USD", 
    "IncotermsClassification": "EXW", 
    "IncotermsTransferLocation": "Palo Alto", 
    "CustomerAccountAssignmentGroup": "01",
    "CustomerGroup": "01",
    "CustomerPaymentTerms": "0004", 
    "to_Item": {
        "results": [
            {
                "SalesOrderItem": "10",
                "SalesOrderItemCategory": "TAN",
                "SalesOrderItemText": "Barang Ariel",
                "PurchaseOrderByCustomer": "Test so",
                "Material": "CAU0099",
                "RequestedQuantity": "20",
                "RequestedQuantityUnit": "PC",
                "ConfdDelivQtyInOrderQtyUnit": "2",
                "NetAmount": "500.00",
                "MaterialGroup": "L004",
                "ProductionPlant": "GON",
                "StorageLocation": "GON1",
                "ShippingPoint": "GOSP",
                "DeliveryPriority": "1",
                "DeliveryDateQuantityIsFixed": false,
                "IncotermsClassification": "EXW",
                "IncotermsTransferLocation": "Palo Alto",
                "IncotermsLocation1": "Palo Alto",
                "MatlAccountAssignmentGroup": "03",
                "CustomerPaymentTerms": "0004",
                "CustomerGroup": "01",
                "ProfitCenter": "MJK",
                "Subtotal1Amount": "500.00",
                "Subtotal2Amount": "500.00",
                "Subtotal3Amount": "500.00",
                "to_PricingElement": {
                    "results": [
                        {
                            "ConditionType": "PPR0",
                            "ConditionRateValue": "500.00",
                            "ConditionCurrency": "USD",
                            "ConditionQuantity": "20",
                            "ConditionQuantityUnit": "PC"
                        }
                    ]
                }
            }
        ]
    }
}

Here is the GET Code in the Business Central

Here is the POST Code in the Business Central

As mentioned earlier, I have successfully retrieved data from SAP in Business Central. However, I encounter a 403 Forbidden error when attempting to create a new Sales Order. I am using the same payload as in Postman. Any assistance would be greatly appreciated. Thank you in advance.

I am trying to confirm whether there is any issue with my Communication System and Communication Arrangement in SAP, but I couldn’t identify what was wrong.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

POST Sales Order using API_SALES_ORDER_SRV

I face some issue on creating Sales Order using API_SALES_ORDER_SRV from External Application (in this case is Dynamics 365 Business Central.

I am trying to create a new sales order from an external application built in Microsoft Dynamics Business Central. I successfully retrieve sales order data using the GET method and the same service endpoint. However, when I attempt to create a new sales order, I receive a “403 Forbidden” error message.

I have verified that the username and password for Basic Authorization are correct, and I have included the X-CSRF-Token in the header of my request. What confuses me is that I can create a new sales order successfully when using Postman.

Could you help me understand why this might be happening?

Here is my GET request in Postman

Here is my POST request in Postman and the payload

payload

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{
"SalesOrderType": "OR",
"SalesOrganization": "SBY",
"DistributionChannel": "SL",
"OrganizationDivision": "SL",
"PriceDetnExchangeRate": "1.00000",
"SoldToParty": "1000347",
"TotalNetAmount": "500.00",
"PurchaseOrderByCustomer": "Test SO (Integration)",
"TransactionCurrency": "USD",
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Palo Alto",
"CustomerAccountAssignmentGroup": "01",
"CustomerGroup": "01",
"CustomerPaymentTerms": "0004",
"to_Item": {
"results": [
{
"SalesOrderItem": "10",
"SalesOrderItemCategory": "TAN",
"SalesOrderItemText": "Barang Ariel",
"PurchaseOrderByCustomer": "Test so",
"Material": "CAU0099",
"RequestedQuantity": "20",
"RequestedQuantityUnit": "PC",
"ConfdDelivQtyInOrderQtyUnit": "2",
"NetAmount": "500.00",
"MaterialGroup": "L004",
"ProductionPlant": "GON",
"StorageLocation": "GON1",
"ShippingPoint": "GOSP",
"DeliveryPriority": "1",
"DeliveryDateQuantityIsFixed": false,
"IncotermsClassification": "EXW",
"IncotermsTransferLocation": "Palo Alto",
"IncotermsLocation1": "Palo Alto",
"MatlAccountAssignmentGroup": "03",
"CustomerPaymentTerms": "0004",
"CustomerGroup": "01",
"ProfitCenter": "MJK",
"Subtotal1Amount": "500.00",
"Subtotal2Amount": "500.00",
"Subtotal3Amount": "500.00",
"to_PricingElement": {
"results": [
{
"ConditionType": "PPR0",
"ConditionRateValue": "500.00",
"ConditionCurrency": "USD",
"ConditionQuantity": "20",
"ConditionQuantityUnit": "PC"
}
]
}
}
]
}
}
</code>
<code>{ "SalesOrderType": "OR", "SalesOrganization": "SBY", "DistributionChannel": "SL", "OrganizationDivision": "SL", "PriceDetnExchangeRate": "1.00000", "SoldToParty": "1000347", "TotalNetAmount": "500.00", "PurchaseOrderByCustomer": "Test SO (Integration)", "TransactionCurrency": "USD", "IncotermsClassification": "EXW", "IncotermsTransferLocation": "Palo Alto", "CustomerAccountAssignmentGroup": "01", "CustomerGroup": "01", "CustomerPaymentTerms": "0004", "to_Item": { "results": [ { "SalesOrderItem": "10", "SalesOrderItemCategory": "TAN", "SalesOrderItemText": "Barang Ariel", "PurchaseOrderByCustomer": "Test so", "Material": "CAU0099", "RequestedQuantity": "20", "RequestedQuantityUnit": "PC", "ConfdDelivQtyInOrderQtyUnit": "2", "NetAmount": "500.00", "MaterialGroup": "L004", "ProductionPlant": "GON", "StorageLocation": "GON1", "ShippingPoint": "GOSP", "DeliveryPriority": "1", "DeliveryDateQuantityIsFixed": false, "IncotermsClassification": "EXW", "IncotermsTransferLocation": "Palo Alto", "IncotermsLocation1": "Palo Alto", "MatlAccountAssignmentGroup": "03", "CustomerPaymentTerms": "0004", "CustomerGroup": "01", "ProfitCenter": "MJK", "Subtotal1Amount": "500.00", "Subtotal2Amount": "500.00", "Subtotal3Amount": "500.00", "to_PricingElement": { "results": [ { "ConditionType": "PPR0", "ConditionRateValue": "500.00", "ConditionCurrency": "USD", "ConditionQuantity": "20", "ConditionQuantityUnit": "PC" } ] } } ] } } </code>
{
    "SalesOrderType": "OR",
    "SalesOrganization": "SBY", 
    "DistributionChannel": "SL", 
    "OrganizationDivision": "SL", 
    "PriceDetnExchangeRate": "1.00000",
    "SoldToParty": "1000347", 
    "TotalNetAmount": "500.00",
    "PurchaseOrderByCustomer": "Test SO (Integration)",
    "TransactionCurrency": "USD", 
    "IncotermsClassification": "EXW", 
    "IncotermsTransferLocation": "Palo Alto", 
    "CustomerAccountAssignmentGroup": "01",
    "CustomerGroup": "01",
    "CustomerPaymentTerms": "0004", 
    "to_Item": {
        "results": [
            {
                "SalesOrderItem": "10",
                "SalesOrderItemCategory": "TAN",
                "SalesOrderItemText": "Barang Ariel",
                "PurchaseOrderByCustomer": "Test so",
                "Material": "CAU0099",
                "RequestedQuantity": "20",
                "RequestedQuantityUnit": "PC",
                "ConfdDelivQtyInOrderQtyUnit": "2",
                "NetAmount": "500.00",
                "MaterialGroup": "L004",
                "ProductionPlant": "GON",
                "StorageLocation": "GON1",
                "ShippingPoint": "GOSP",
                "DeliveryPriority": "1",
                "DeliveryDateQuantityIsFixed": false,
                "IncotermsClassification": "EXW",
                "IncotermsTransferLocation": "Palo Alto",
                "IncotermsLocation1": "Palo Alto",
                "MatlAccountAssignmentGroup": "03",
                "CustomerPaymentTerms": "0004",
                "CustomerGroup": "01",
                "ProfitCenter": "MJK",
                "Subtotal1Amount": "500.00",
                "Subtotal2Amount": "500.00",
                "Subtotal3Amount": "500.00",
                "to_PricingElement": {
                    "results": [
                        {
                            "ConditionType": "PPR0",
                            "ConditionRateValue": "500.00",
                            "ConditionCurrency": "USD",
                            "ConditionQuantity": "20",
                            "ConditionQuantityUnit": "PC"
                        }
                    ]
                }
            }
        ]
    }
}

Here is the GET Code in the Business Central

Here is the POST Code in the Business Central

As mentioned earlier, I have successfully retrieved data from SAP in Business Central. However, I encounter a 403 Forbidden error when attempting to create a new Sales Order. I am using the same payload as in Postman. Any assistance would be greatly appreciated. Thank you in advance.

I am trying to confirm whether there is any issue with my Communication System and Communication Arrangement in SAP, but I couldn’t identify what was wrong.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật