Placeholder

Customer Forum

Required parameters are absent: 'create_from_type' Reference: XXXXXX-XXXXX-XXXXX

Jorge Posted: 2022-11-08 21:23

Hi Workbooks Team,

I've been trying to create a simple Customer Order using javascript and axios library but it seems like there is an error on server side that says


{
success: false,
failures: [
"Required parameters are absent: 'create_from_type' Reference: 836835-06850-94233"
]
}

this is my request config object

{
headers: {
'Content-Type': 'application/json',
Cookie: 'Workbooks-Session='
},
url: 'https://secure.workbooks.com/accounting/sales_orders.api',
data: {
_authenticity_token: '',
id: 0,
lock_version: 0,
assigned_to: 119,
description: 'Test 2',
document_currency: 'GBP',
document_date: '2022-11-08',
status: 'DRAFT',
tax_point_date: '2022-11-08'
},
method: 'post'
}

Then if I set a random number like 1 in 'create_from_type' in the request I get yet another error that says

{
success: false,
failures: [
'We are sorry that there has been an error.\n' +
'Workbooks has recorded the incident with reference: 629089-22852-38769'
]
}

How can I get around this issue? thanks in advance

-- Jorge Cortes

Jorge Posted: Tue, 08.11.2022 - 23:13

I've also just tested with curl and it doens't work either

I tried to create a Customer Order like:


curl -X POST https://secure.workbooks.com/accounting/sales_orders.api \
-H "Cookie: Workbooks-Session=SESSION_ID" \
-d '_authenticity_token=TOKEN_ID' \
-d 'assigned_to=119' \
-d 'description=Test 2' \
-d 'document_currency=GBP' \
-d 'document_date=2022-11-08' \
-d 'status=DRAFT' \
-d 'tax_point_date=2022-11-08'

But got the same result

{
"failures" : ["Required parameters are absent: 'create_from_type' Reference: 417239-02574-05542"],
"success" : false
}

-- Jorge Cortes

Jorge Posted: Wed, 09.11.2022 - 02:23

Hi Workbooks team,

Nevermind, this issue was already fix on my end. Thanks anyways

-- Jorge Cortes