PurchaseOrder_Create fails with Decimal error

I’ve written integration with QuickFile API to import customers, people, suppliers and invoices. However I cannot get Purchase Orders to work.

When using the API Sandbox area, simply using the example XML provided (by you):

<PurchaseOrder_Create  xmlns="http://www.QuickFile.co.uk"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.QuickFile.co.uk http://www.quickfile.co.uk/WebServices/API/Schemas/invoices/PurchaseOrder_Create.xsd">
      <!-- Hidden -->
            <ItemDescription>Ergonomically Designed Inner Earphones with 3.5mm headphone jack</ItemDescription>

and pressing “Post XML” results in:

<?xml version="1.0" encoding="utf-8"?>
      <Error>Value was either too large or too small for a Decimal.</Error>

Any ideas whats going on? Are Purchase Order not supported by the API? Thanks.

Hi @Tim_McCurdy

I’ve just tested this and it seems to have worked all OK. I have however passed this to our dev team to see if they could take a closer look.

We’ll come back to you shortly.

Thanks for the fast response. It’s strange that the error is happening for me on the Sandbox like this then. Maybe it is account specific?

All I did was:

  1. Create default provided Supplier using Sandbox.
  2. Create default provided Purchase Order using Sandbox (copying the SupplierID returned by 1).
  3. Got this error.

My account has many Clients and Invoices though already from development.

Thanks for the info - I’ll certainly pass this on to our dev team

@Tim_McCurdy - We’ve identified an error which is based on the date of the Purchase Order. If you change it to something more recent, then this will work fine :slight_smile: