Error when trying to post a multiple PO Receipt using sage web API

SOLVED

Hello Guys,

I'm having an issue when trying to post a multiple Purchase Orders receipt, the error I'm getting is:

{
"error": {
"code": "RecordDuplicate",
"message": {
"lang": "en-US",
"value": "This is not a multiple purchase order receipt."
}
}
}

The receipt header param MultiplePurchaseOrders (as shown below) is set to true; probably I need to add some mandatory params in order to post the receipt but I cannot figure out which ones I missed, hope you guys can help me out.

Thanks!

The POST body params:

{
"Vendor": "XIDAME",
"MultiplePurchaseOrders": true,
"PurchaseOrders": 2,
"ReceiptLine2s": [
{
"ItemNumber": "0-002-92-00198",
"Location": "10",
"QuantityReceived": 12.93,
"UnitOfMeasure": "SQYD",
"PurchaseOrderSequenceKey": 29653959,
"PurchaseOrderLineSequence": 29653900,
"UnitCost": 5.03,
"PurchaseOrderNumber": "PO59927"
},
{
"ItemNumber": "0-002-14-00100",
"Location": "10",
"QuantityReceived": 76.06,
"UnitOfMeasure": "SQYD",
"PurchaseOrderSequenceKey": 29673773,
"PurchaseOrderLineSequence": 29673731,
"UnitCost": 5.09,
"PurchaseOrderNumber": "PO59957"
}
],
"ReceiptVendor2s": [
{
"Vendor": "FRECON",
"AutotaxcalculationOnsave": true,
"Amount": 87.81,
"ReceiptAdditionalCost3s": [
{
"AdditionalCost": "F",
"Amount": 75.000,
"ProrationMethod": "3",
"ReprorationMethod": "2",
"Description": "THC"
},
{
"AdditionalCost": "F",
"Amount": 12.81,
"ProrationMethod": "3",
"ReprorationMethod": "2",
"Description": "Freights USD"
}
]
}
],
"ReceiptPurchaseOrders": [
{
"PurchaseOrderSequenceKey": 29653959,
"PurchaseOrderNumber": "PO59927",
"StoredInDatabaseTable": true
},
{
"PurchaseOrderSequenceKey": 29673773,
"PurchaseOrderNumber": "PO59957",
"StoredInDatabaseTable": true
}
]
}

Parents
  • 0

    Hey,

    I would suggest making sure that a multiple PO receipt exists in the database and then using the GET of the POReceipts endpoint with the filter being MultiplePurchaseOrders eq (true) to then view the payload. This should assist in comparing what field might not being set correctly.

    I will check with our QA dept to see if they have any scripts they used in testing that might have this configuration.

  • 0 in reply to John Thomas

    Hi John, thanks for your quick answer.

    I did a test as you recommended bu it didn't work. It will be very helpful if you can get the script with this configuration.

    Thanks in advance!

  • 0 in reply to lepepe

    I just got a confirmation from our QA folks that this configuration is not supported. The reason is that the UI has a manual step (pressing the Receive button), which invokes another process. So, it is not as simple as something in the payload as other tables are involved. I will add this as an enhancement request to our backlog for the Web API. 

    I'm sorry we are not able to support this functionality at this time.

  • 0 in reply to John Thomas

    That would be a very good enhancement.

    I also noticed that receipts cannot be associated with Purchase Orders (just one PO no multiples), for example if I want to post a receipt of an item that was ordered on an specific PO, the receipt is posted (only if the ReceiptPurchaseOrders param is not include in the body request) but the receipt header and line do not specify from which PO and the PO line is not updated with the received amount.

    Probably it is because of the same UI's manual step.

    Regards,

  • 0 in reply to lepepe

      We are trying to post PO Receipts using the Sage 300 API and I have encountered the same problem as with regards to the association between the PO and the PO Receipt. If I include PO details like the the PurchaseOrderNumber, PurchaseOrderSequenceKey and the PurchaseOrderLineSequence when I post a PO Receipt using the API, these details are not saved , and are not set in the return JSON.

    In fact, when I do not include any PO details in the PO Receipt the receipt saves regardless, so it seems like the PO details are not used at all. This seems strange, as I cannot imagine one wanting to create a PO Receipt via the API without associating it with a PO?

    Is this a known issue or is there possibly something wrong with the specific installation I am working with? Do you have any tips for resolving this issue?

    Thanks in advance.

  • 0 in reply to Raoul de Villiers

    I must admit that is strange! Let me open up a defect for the team to look at this.

  • 0 in reply to John Thomas

    Hi , any indication of the source and possible solutions for this problem from the development team?

    Thanks.

  • 0 in reply to Raoul de Villiers

    Not yet. This is in queue, but there are issues that must be addressed before getting to this :(

  • 0 in reply to John Thomas

      We are still struggling with this, we are thinking more and more that this is an issue with Sage 300 itself. Can you confirm yet?

  • 0 in reply to John Thomas

    I ran into this queue. Today is August 2020. And I am having the same problem of not being able to associate a Receipt to a Purchase Order, no matter how I change the payload.
    I am trying to use the web api. Have tried for several weeks now, with different values and no configuration have been able to associate the Receipt to the Purchase Order. Documentation is non existent on this matter.
    Please advice.

  • 0 in reply to John Thomas

    Wow, 2 years after first reported, we run into the same issue! What a colossal waste of effort for us. We were processing EDI transactions in and have been scratching our heads as to why this wasn't working.

    It's like trying to poke holes in a black box. No documentation other than Swagger UI. Is there a list of other such hidden gems in the Sage Web API that is maintained so we don't keep running into these issues? 

    And what is the alternative here? use native accpac API?

Reply
  • 0 in reply to John Thomas

    Wow, 2 years after first reported, we run into the same issue! What a colossal waste of effort for us. We were processing EDI transactions in and have been scratching our heads as to why this wasn't working.

    It's like trying to poke holes in a black box. No documentation other than Swagger UI. Is there a list of other such hidden gems in the Sage Web API that is maintained so we don't keep running into these issues? 

    And what is the alternative here? use native accpac API?

Children