Integration

Get Involved. Join the Conversation.

Topic

    Mohana Gopal Selvam
    SCM - WorkOrder APIAnswered
    Topic posted October 16, 2019 by Mohana Gopal SelvamSilver Crown: 22,500+ Points, tagged Integration 
    50 Views, 3 Comments
    Title:
    SCM - WorkOrder API
    Content:

    Hi,

    I have tried to test the SCM - Workorder creation API in Postman as per the Oracle document

    https://docs.oracle.com/en/cloud/saas/supply-chain-and-manufacturing/19d/fasrp/op-fscmrestapi-resources-11.13.18.05-maintenanceworkorders-x-operations-0.html

    Get operation is working. But post operation is not working. It returns as 400 Bad Request error. Any Idea?

    Request:


     "WorkOrderNumber": "BA_WO_8",
     "WorkOrderTypeCode": "CORRECTIVE",
     "WorkOrderSubTypeCode": "ORA_CONDITION_BASED",
     "AssetNumber": "VA MTR TST1",
     "OrganizationCode": "M1"
    }

    Response: Unexpected 'T'


     "WorkOrderNumber": "BA_WO_8"
    }

    Response: Unexpected 'Y'

    Thanks,

    Mohan

    Version:
    19C

    Best Comment

    Kanchankumar Khedkar

    Can you please the JSON once again - problem is

    "WorkOrderSubTypeCode": "ORA_EMERGENCY" "," is missing here. Please try below one.

    {
    "WorkOrderNumber": "MSIMDDXB2",
    "WorkOrderTypeCode": "CORRECTIVE",
    "WorkOrderSubTypeCode": "ORA_EMERGENCY",
    "WorkOrderDescription": null,
    "OrganizationCode": null,
    "OrganizationId": 300000002812765
    }

    Comment

     

    • Mohana Gopal Selvam

      My request is

      curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://***-dev1.fa.em2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/maintenanceWorkOrders"
       
       
      • Kanchankumar Khedkar

        Can you please the JSON once again - problem is

        "WorkOrderSubTypeCode": "ORA_EMERGENCY" "," is missing here. Please try below one.

        {
        "WorkOrderNumber": "MSIMDDXB2",
        "WorkOrderTypeCode": "CORRECTIVE",
        "WorkOrderSubTypeCode": "ORA_EMERGENCY",
        "WorkOrderDescription": null,
        "OrganizationCode": null,
        "OrganizationId": 300000002812765
        }

    • Mohana Gopal Selvam

      Thanks Kanchan.

      Working cURL

      curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/maintenanceWorkOrders"
      {
      "WorkOrderNumber": "MSIMDDXB2",
      "WorkOrderTypeCode": "CORRECTIVE",
      "WorkOrderSubTypeCode": "ORA_EMERGENCY",
      "WorkOrderDescription": null,
      "OrganizationCode": null,
      "OrganizationId": 300000002812765
      }

      Thanks,

      Mohan