Click here to Skip to main content
15,069,133 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to create WEB API for below format just like Purchase Order Format

[
    {
        "PO_NUMBER": "12345TSTPO",
        "PO_DATE": "12/27/2018 12:00:00 AM",
        "PO_EXPIRY_DATE":"12/27/2018 12:00:00 AM",
        "ORG_MOD": "ALI",
        "PO_VALUE": "214",
        "VENDOR_CODE": "Vendor WarehouseAddress",
        "PO_ISSUE_LOC_CODE": "1009307294",
        "PO_DELV_LOC_CODE": "IN019387820-S",
        "VENDOR_DETAIL": "S-VIJAY SALES",
        "PO_ISSUE_LOC_DETAIL": "Vendor Address ",
        "PO_DELV_LOC_DETAIL": "999",
        "PAYMENT_TERMS": "2147483647",       
        "PoDetail": [
            {
                "PO_NUMBER": "test",
                "PO_LINE_NO": "1",
                "EAN": null,
                "ITEM": "",
                "ARTICLE_NO": "Clothes Washer_Turbo Drum",
                "QTY": 25,
                "UOM": "EA",
                "BASE_COST": "12211.56000000",
                "SALE_TAX": 0,
                "TOTAL_BASE_VALUE": 54952.02,
                "TOTAL_TAX_VALUE": 360241.02,
                "DELIVERY_INSTRUCTION": "63936951",
                "PO_LINE_EXPIRY_DATE]": "12/27/2018 12:00:00 AM"
            },
            {
               
                "PO_NUMBER": "test",
                "PO_LINE_NO": "1",
                "EAN": null,
                "ITEM": "",
                "ARTICLE_NO": "Clothes Washer_Turbo Drum",
                "QTY": 25,
                "UOM": "EA",
                "BASE_COST": "12211.56000000",
                "SALE_TAX": 0,
                "TOTAL_BASE_VALUE": 54952.02,
                "TOTAL_TAX_VALUE": 360241.02,
                "DELIVERY_INSTRUCTION": "63936951",
                "PO_LINE_EXPIRY_DATE]": "12/27/2018 12:00:00 AM"
            },
            {
               
                "PO_NUMBER": "test",
                "PO_LINE_NO": "1",
                "EAN": null,
                "ITEM": "",
                "ARTICLE_NO": "Clothes Washer_Turbo Drum",
                "QTY": 25,
                "UOM": "EA",
                "BASE_COST": "12211.56000000",
                "SALE_TAX": 0,
                "TOTAL_BASE_VALUE": 54952.02,
                "TOTAL_TAX_VALUE": 360241.02,
                "DELIVERY_INSTRUCTION": "63936951",
                "PO_LINE_EXPIRY_DATE]": "12/27/2018 12:00:00 AM"
            }
        ] }
]


What I have tried:

i try to Post data in JSON and get on API Controller in JObject but not working
Posted
Updated 1-Mar-19 2:56am
v2
Comments
Richard MacCutchan 1-Mar-19 5:19am
   
Please edit your question and explain what "not working" means.
MadMyche 1-Mar-19 6:51am
   
Do you have the code that is serializing your objects into the JSON

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900