Help on a API Error - Composite End point

We are exporting invoice data to the composite end point.

We have 14 line items and are updating a document item tag on each line, all from within the one post.

 

I am getting the following error from the API

 

"errorCode":"LIMIT_EXCEEDED",

"message":"The request can’t contain more than 25 operations."

 

 

Can anyone suggest how we might able to use the composite end point to raise an invoice with this many lines?

Parents
  • Hi,

    Thanks for your question.

    It may be a Salesforce limit that you're hitting rather than a Sage limit. I would suggest splitting the request and if this doesn't work, reply with the request you're making and I'll take a further look at this.

    Thanks,

    Mel

  • I have tried splitting this by first posting to

    s2cor__Sage_INV_Trade_Document__c
    and 

    s2cor__Sage_INV_Trade_Document_Tag__c

    I set the referenceid on the former = SSTEST1909242609561

    I then tried posting to s2cor__Sage_INV_Trade_Document_Item__c endpoint, I set the  "s2cor__Trade_Document__c" (value to the reference id from my first post..

    the error message I got on this attempt was;

    Could not find the referenced operation SSTEST1909242609561

  • Hi.
    As your first complete request has 30 POST actions, this will hit salesforce limit. Splitting the this request up could be the solution.

    The reason it can't find the referenced operation SSTEST1909242609561 is that you are sending 2 independent requests. The 2nd item request cannot reference @{SSTEST1909242609561.Id}. You would need to have the actual Trade Document Id in there that the first POST created.

  • Thanks. Where can I get the actual trade document id from?

    Is it a value retuned in the response? (below)

    Or do I have to perform a get first to see this?

    {
    "compositeResponse":[
    {
    "body":{
    "id":"a1x6F00000896QAQAY",
    "success":true,
    "errors":[ ]
    },
    "httpHeaders":{
    "Location":"\/services\/data\/v44.0\/sobjects\/s2cor__Sage_INV_Trade_Document__c\/a1x6F00000896QAQAY"
    },
    "httpStatusCode":201,
    "referenceId":"SSTEST1909242609561"
    },
    {
    "body":{
    "id":"a1u6F000005xxckQAA",
    "success":true,
    "errors":[ ]
    },
    "httpHeaders":{
    "Location":"\/services\/data\/v44.0\/sobjects\/s2cor__Sage_INV_Trade_Document_Tag__c\/a1u6F000005xxckQAA"
    },
    "httpStatusCode":201,
    "referenceId":"NewPurchaseInvoiceTag"
    }
    ]
    }

  • Looking at the response you have attached;

    "id":"a1x6F00000896QAQAY" or "Location":"\/services\/data\/v44.0\/sobjects\/s2cor__Sage_INV_Trade_Document__c\/a1x6F00000896QAQAY"

Reply Children
No Data