Skip to main content
Hi, I am trying to create a new case thru the REST API that is exposed. I have set the OAUTH2 Token and set the JSON body. I am doing the POST.

URL:-

https://xyz-dev-ed.lightning.force.com/services/data/v47.0/sobjects/Case/

It is not creating the record but giving the response for the object describe as follows:-

{

    "objectDescribe": {

        "activateable": false,

        "createable": true,

        "custom": false,

        "customSetting": false,

        "deepCloneable": false,

        "deletable": true,

        "deprecatedAndHidden": false,

        "feedEnabled": true,

        "hasSubtypes": false,

        "isInterface": false,

        "isSubtype": false,

        "keyPrefix": "500",

        "label": "Case",

        "labelPlural": "Cases",

        "layoutable": true,

        "mergeable": false,

        "mruEnabled": true,

        "name": "Case",

        "queryable": true,

        "replicateable": true,

        "retrieveable": true,

        "searchable": true,

        "triggerable": true,

        "undeletable": true,

        "updateable": true,

        "urls": {

            "compactLayouts": "/services/data/v47.0/sobjects/Case/describe/compactLayouts",

            "rowTemplate": "/services/data/v47.0/sobjects/Case/{ID}",

            "approvalLayouts": "/services/data/v47.0/sobjects/Case/describe/approvalLayouts",

            "caseArticleSuggestions": "/services/data/v47.0/sobjects/Case/suggestedArticles",

            "caseRowArticleSuggestions": "/services/data/v47.0/sobjects/Case/{ID}/suggestedArticles",

            "defaultValues": "/services/data/v47.0/sobjects/Case/defaultValues?recordTypeId&fields",

            "listviews": "/services/data/v47.0/sobjects/Case/listviews",

            "describe": "/services/data/v47.0/sobjects/Case/describe",

            "quickActions": "/services/data/v47.0/sobjects/Case/quickActions",

            "layouts": "/services/data/v47.0/sobjects/Case/describe/layouts",

            "sobject": "/services/data/v47.0/sobjects/Case"

        }

    },

    "recentItems": [

        {

            "attributes": {

                "type": "Case",

                "url": "/services/data/v47.0/sobjects/Case/5001U00000ZYn3FQAT"

            },

            "Id": "5001U00000ZYn3FQAT",

            "CaseNumber": "00011586"

        },

        {

            "attributes": {

                "type": "Case",

                "url": "/services/data/v47.0/sobjects/Case/5001U00000ZYZlvQAH"

            },

            "Id": "5001U00000ZYZlvQAH",

            "CaseNumber": "00011585"

        }

    ]

}

what am I missing?
2 respostas
  1. 9 de set. de 2024, 14:40

    The problem is that you are indicating GET instead of POST.

    In case if this helped can you please choose this as the best answer so that it can be used by others in the future.

0/9000