Objective: Sends purchase invoice (for goods inbound)
JSON Composition for sending inbound invoice:
{
*"auth" : key obtained in get/auth method
*,"invoice" :
{
"key" : invoice key
,"number" : invoice number
,"serial" : invoice serial number
,"purpose" : 1/normal entry, 2/return (default 1)
,"note" : reason for return
,"data" : base 64 of the purchase Nfe XML
}
,"products":
[
{
"code_invoice": client/supplier SKU code
,"code_to": product code registered in FMS
}
]
}
Returns with:
{
"code" : integer – system execution code
,"message" : text – "OK" or detailed error message
,"id": integer – internal invoice number
}
Code:
200: purchase invoice processing (stock may take up to 1h to reflect)
400: fiscal invoice contained errors, check "message" tag
401: invoice already inserted
402: SKU missing mandatory mapping
500: invalid auth
501: user without authorization to insert purchase invoice