API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

CREATING A SUPPLIER INVOICE VOUCHER

0
Hi,
 
I'm using DEV account and I wanted to test your method to "CREATING A SUPPLIER INVOICE VOUCHER" posted on your webside: http://restdocs.e-conomic.com/#creating-a-supplier-invoice-voucher
 
Unfortunately I have received an error.
{
    "readyState": 4,
    "responseText": "{\"message\":\"We have experienced an internal server error. The error has been logged.\",\"errorCode\":\"E00000\",\"developerHint\":\"If you continue to see errors here, please contact api@e-conomic.com. Remember to include error id and agreement number when contacting support.\",\"logId\":\"50aa6fc4-f2c7-4f9a-9382-37831cd98c50\",\"httpStatusCode\":500,\"logTime\":\"2015-03-27T08:43:11\"}",
    "responseJSON": {
        "message": "We have experienced an internal server error. The error has been logged.",
        "errorCode": "E00000",
        "developerHint": "If you continue to see errors here, please contact api@e-conomic.com. Remember to include error id and agreement number when contacting support.",
        "logId": "50aa6fc4-f2c7-4f9a-9382-37831cd98c50",
        "httpStatusCode": 500,
        "logTime": "2015-03-27T08:43:11"
    },
    "status": 500,
    "statusText": "Internal Server Error"
}
 
Then I've changed the credentials to match my application. But still error. But the different one.
 
{
    "readyState": 4,
    "responseText": "{\"message\":\"numberSeries is missing on voucher at index 0\",\"errorCode\":\"E04040\",\"logId\":\"ee5e7234-16fd-49be-9d5c-1183226750a9\",\"httpStatusCode\":400,\"logTime\":\"2015-03-27T08:36:21\"}",
    "responseJSON": {
        "message": "numberSeries is missing on voucher at index 0",
        "errorCode": "E04040",
        "logId": "ee5e7234-16fd-49be-9d5c-1183226750a9",
        "httpStatusCode": 400,
        "logTime": "2015-03-27T08:36:21"
    },
    "status": 400,
    "statusText": "Bad Request"
}
 
can you help me with this one?
 
Regards 

 

Lukasz
created Mar 27, 2015 by LuBaki
0% Accept Rate

edited Mar 27, 2015 by LuBaki
Q 2 A 0 C 1

1 Answer

0

Hi LuBaki,

The first error is caused by a missing accounting year. We are aware of that, and in the release after Easter this will return a more descriptive error message.

The second one is because you need to set up your number series, and make sure that it exists. As stated in the documentation, you need to make sure it is an object reference as well eg.

"numberSeries": { "numberSeriesNumber": 3, "self": "https://restapi.e-conomic.com/number-series/3" }

You just put in the text "somenumberseries".

answered Apr 1, 2015 by rbb
Ok. How do I add a numberSeries with API.

My try was:

{"numberSeriesNumber": 1,"name": "Supplier invoice TEST","prefix": "S","systemGenerated": true,"entryType": "supplierInvoice","allowGaps": false,"peeks": [{"accountingYear": {"year": "2014","self": "https://restapi.e-conomic.com/accounting-years/2014"},"nextVoucherNumber": 31,"lastBookedVoucherNumber": 17},{"accountingYear": {"year": "2013","self": "https://restapi.e-conomic.com/accounting-years/2013"},"nextVoucherNumber": 1},{"accountingYear": {"year": "2012","self": "https://restapi.e-conomic.com/accounting-years/2012"},"nextVoucherNumber": 1}],"self": "https://restapi.e-conomic.com/number-series/1"}

Error msg:

{
message: "Please change your entry type. The entry type supported is: JournalEntry - cannot be empty"
errorCode: "E04000"
logId: "e506b43f-8b7a-46cd-83a1-afde53c7b3cc"
httpStatusCode: 400
logTime: "2015-04-02T09:09:39"
}
Visma e-conomic A/S
...