0

I am using POstman to execute composite API. Got the sample request from this link - https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_composite_record_manipulation.htm

Here is my postman setup: enter image description here

URL I am hitting is composite API, version is V59. All endpoint,authentication,access tokens looks good because I was able to use Bulk API before using composite API.

Response I received:

{
    "compositeResponse": [
        {
            "body": [
                {
                    "errorCode": "NOT_FOUND",
                    "message": "The requested resource does not exist"
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 404,
            "referenceId": "NewAccount"
        },
        {
            "body": [
                {
                    "errorCode": "PROCESSING_HALTED",
                    "message": "The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 400,
            "referenceId": "NewAccountInfo"
        },
        {
            "body": [
                {
                    "errorCode": "PROCESSING_HALTED",
                    "message": "The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 400,
            "referenceId": "NewContact"
        },
        {
            "body": [
                {
                    "errorCode": "PROCESSING_HALTED",
                    "message": "The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 400,
            "referenceId": "NewAccountOwner"
        },
        {
            "body": [
                {
                    "errorCode": "PROCESSING_HALTED",
                    "message": "The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders": {},
            "httpStatusCode": 400,
            "referenceId": "AccountMetadata"
        }
    ]
}

What is that I am missing? Please assist.

5
  • 1
    v60.0? Are you doing this in a sandbox that's been updated to Spring '24?
    – Derek F
    Feb 14 at 14:14
  • 1
    All orgs are on Spring '24 since this Monday so API v60.0 is correct.
    – POZ
    Feb 14 at 14:22
  • @SfdcBat can you check that you have proper permissions to create an account using the REST > SObjects > SObject Create request from the Postman collection?
    – POZ
    Feb 14 at 14:24
  • Ah Yes, it is in v60. And also I do have access to objects.
    – SfdcBat
    Feb 14 at 14:27
  • I am not sure why it would not work with 59, is it not back compatible?
    – SfdcBat
    Feb 14 at 14:41

1 Answer 1

0

I had to change the Version of composite API from 59.0 to 60.0 that fixed the issue. But I am not sure why it would not work with 59!

7
  • Wait, so you were using /composite/v59.0 for the overall request but then using /v60.0/sobjects/Account in the subrequest? If that's the case, why would you think that using a more recent api version (compared to the overall request) would work?
    – Derek F
    Feb 14 at 17:06
  • What i did was instead of using /composite/v59.0 I used - /composite/v60.0
    – SfdcBat
    Feb 14 at 17:39
  • Yeah, I can see that because that's what you wrote. My comment was why did you think having a newer api version in the subrequests would work? As usual, being detailed really is important on sites like this.
    – Derek F
    Feb 14 at 17:42
  • Thats what I am trying to understand why would changing it to v60.0 would make this work. i'm not sure
    – SfdcBat
    Feb 14 at 18:33
  • We're either talking past each other, or maybe there's just a breakdown in understanding somewhere. What I've been saying this whole time is because the API version of the overall composite request apparently needs to be less than or equal to the API version used in the subrequests. Why would the v59.0 API know anything about the API versions that are newer than it? That would be forward compatibility (which can happen, but is less common). If you were to try v58.0 in the composite and v59.0 in the subrequests, I'd expect it should also error out.
    – Derek F
    Feb 14 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .