Erro ao enviar dados do Invoice para Vtex

Estou tentando integrar o retorno de quando é faturado o pedido no nosso ERP para Vetex estou seguindo a documentação que nos diz para enviar da seguinte forma:

{ "type":"Output",

"issuanceDate":"2018-07-31",

"invoiceNumber":"000108588",

"invoiceValue":"25970",

"invoiceKey": null,

"invoiceUrl": null,

"courier": null,

"trackingNumber": null,

"trackingUrl": null,

"items": [

{ "id": "4073",

"price": 8070,

"quantity":1

}

{ "id": "18783",

"price": 8450,

"quantity":1

}

{ "id": "15397",

"price": 9450,

"quantity":1

}

]

}

Porém quando executo a Vtex me retorno o segunte erro

{"error": {

"code": "1",

"message": "Invoice Request is null. The following fields are mandatory: invoiceNumber, invoiceValue and issuanceDate",

"exception": {

"ClassName": "Vtex.Practices.ServiceModel.Client.Exceptions.BadRequestException",

"Message": "Invoice Request is null. The following fields are mandatory: invoiceNumber, invoiceValue and issuanceDate",

"Data": null,

"InnerException": null,

"HelpURL": null,

"StackTraceString": " at Vtex.Commerce.Oms.WebApi.OrdersApiController.<NotifyInvoice>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Vtex.Commerce.Oms.WebApi.Filter.AccessControlFilter.<ExecuteActionFilterAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()",

"RemoteStackTraceString": null,

"RemoteStackIndex": 0,

"ExceptionMethod": "8\nMoveNext\nVtex.Commerce.Oms.WebApi, Version=1.5.303.1272, Culture=neutral, PublicKeyToken=null\nVtex.Commerce.Oms.WebApi.OrdersApiController+<NotifyInvoice>d__19\nVoid MoveNext()",

"HResult": -2146233088,

"Source": "Vtex.Commerce.Oms.WebApi",

"WatsonBuckets": null

}

}}

Alguém saberia me informar como resolvo isso?

Bom dia

Marcelo evite passar estes campos NULL, já que não estão sendo informados remova do seu json.

Estou passando somente estes no meu caso:

"Output" , "invoiceNumber", "courier", "trackingNumber", "trackingUrl", "issuanceDate", "invoiceValue"

Att

Já fiz essa tentativa de enviar sem os campos Null, porém a erro perciste

No meu código não passa os itens só informação do pedido. Já tentou faturar pelo postman? Url: http://loja.vtexcommercestable.com.br/api/oms/pvt/orders/840980063036-01/invoice Body: { "Output": "type", "invoiceNumber": "NFe-000607541", "courier": "", "trackingNumber": "", "trackingUrl": "", "issuanceDate": "2018-07-16T07:27:00", "invoiceValue": 156448 } Header: [cid:image001.png@01D42978.D6B50970]

Sem os itens Funcionou, mas meu na Documentação da Vtex está que tem de mandar os itens. muito confuso essa documentação

Não precisa dos itens no caso de faturamento completo. Sim muito confuso a documentação. Espero ter ajudado. Abs​

Pelo SoapUI a requisição acontece sem problemas mas quando monta na minha rotina ele me retorna

400 BadRequest e o erro acima muito estranho, alguém para dar uma luz?