Replies: 4 comments 4 replies
-
|
Buongiorno, Le chiederei quindi:
Grazie |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Faró una prova con postman. Facendo un po di test sembra che il client
guzzle imposti correttamente il json nel body della richiesta, ma lo stesso
identico errore, lo ricevo se per esempio passo un array vuoto.
Farò appena possibile un test con postman
Il mer 14 set 2022, 18:17 Mauro Valota ***@***.***> ha
scritto:
… Buongiorno,
l'errore "The i dati field is required." viene restituito quando il body
passato non corrisponde alla struttura attesa dall'api.
Poiché ad una prima occhiata il body JSON postato sembrerebbe essere
corretto, potrebbe essere che il body non sia stato passato correttamente
alla richiesta.
Le chiederei quindi:
1. di provare ad utilizzare l'API Reference
<https://developers.fattureincloud.it/api-reference> oppure Postman
<https://developers.fattureincloud.it/docs/quickstarts/postman-collection>,
inserendo il suo access token e il body JSON, per capire se il problema sta
effettivamente nel contenuto del JSON o nel comportamento dell'SDK
2. qualora il risultato ottenuto dovesse essere differente, le
consiglierei di controllare il suo codice per verificare che i parametri
siano passati correttamente
Grazie
Mauro
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQWJJSJLXNVU7ZXDTQYPYLV6H3ANANCNFSM6AAAAAAQMRX66E>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Fortunatamente ho trovato la problematica. Un carattere speciale
all'interno del token (a causa di un typo) incasinava gli header http della
richiesta.
Ora dopo aver risolto degli altri errori di validazione, mi viene sempre
risposto
message":"An unexpected error occurred. Contact support for more information.
Il giorno gio 15 set 2022 alle ore 00:29 next731 ***@***.***>
ha scritto:
… @doshu <https://github.com/doshu> , temo che non hai specificato il
parametro NUMBER, che è il numero fattura ed è obbligatorio.
—
Reply to this email directly, view it on GitHub
<#73 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQWJJQNJL7UBDZF6DQ2Y63V6JGVPANCNFSM6AAAAAAQMRX66E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Si, dopo un po di test, ho scoperto che l'SDK php converte le date nel
formato corretto, solo se si passa un oggetto di tipo DateTime, mentre se
l'oggetto é comunque un tipo DateTimeInterface non funziona. L'errore 500
era per un formato data non corretto
Il ven 16 set 2022, 11:52 Mauro Valota ***@***.***> ha
scritto:
… Ciao @doshu <https://github.com/doshu> sei riuscito a risolvere?
Grazie
Mauro
—
Reply to this email directly, view it on GitHub
<#73 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQWJJWAAXUCTSBILNEDTE3V6Q7M7ANCNFSM6AAAAAAQMRX66E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
valmoz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sto cercando di creare una fattura tramite l'SDK PHP
purtroppo, anche compilando correttamente i campi, escono sempre questi erroro
{#313 ▼ +"error": {#295 ▼ +"message": "Invalid request." +"validation_result": {#312 ▼ +"data": array:1 [▼ 0 => "The i dati field is required." ] +"data.entity": array:1 [▼ 0 => "The data.entity field is required." ] +"data.type": array:1 [▼ 0 => "The data.type field is required." ] } } }questo è il json che viene inviato dall'SDK
{ "data":{ "entity":{ "name":"TS srl", "vat_number":"05788590965", "tax_code":"", "address_street":"via cavour ", "address_postal_code":"13900", "address_city":"biella", "address_province":"BI", "country":"IT" }, "type":"invoice", "numeration":"\/fatt", "date":{ "date":"2022-01-26 00:00:00.000000", "timezone_type":3, "timezone":"UTC" }, "currency":{ "id":"EUR" }, "language":{ "name":"italiano" }, "subject":"Fattura", "visible_subject":"Fattura", "payment_method":{ "name":"Contanti" }, "use_gross_prices":true, "items_list":[ { "code":"id_55", "name":"SMOONTAGGIO E RIMONTAGGIO", "gross_price":30, "category":"prodotto", "discount":0, "qty":1, "vat":{ "id":0 } }, { "code":20777, "name":"FONDMETAL 9 ESSE", "gross_price":150, "category":"prodotto", "discount":0, "qty":4, "vat":{ "id":0 } } ], "payments_list":[ { "due_date":{ "date":"2022-01-26 00:00:00.000000", "timezone_type":3, "timezone":"UTC" }, "amount":630, "status":"paid", "payment_account":{ "id":969222 }, "paid_date":{ "date":"2022-01-26 00:00:00.000000", "timezone_type":3, "timezone":"UTC" } } ], "show_payment_method":true } }Beta Was this translation helpful? Give feedback.
All reactions