你好我真的tryng與船批次工作,之後我創建批處理這樣的:批次狀態 - 失敗創建後「驗證」
{"default_carrier_account":"9348***********50","default_servicelevel_token":"usps_priority","metadata":"test","label_filetype":"PDF_4x6","batch_shipments":[{"carrier_account":"93********************","servicelevel_token":"usps_priority","shipment":"c8c411c2ad8b497eb583decf7c3c614d","metadata":1},{"carrier_account":"9348ce6eecf**********ab850","servicelevel_token":"usps_priority","shipment":"768ae43826b04040b32490a6f069fa4f","metadata":2}]}
,我得到的通知是這樣的:
batch 0f0b69ae42bc475ab3c1421edddeb4fc creation failed
並在此之後,我嘗試做API請求並獲取批量數據(狀態,消息等..)我沒有發佈請求:http://api.goshippo.com/batches/0f0b69ae42bc475ab3c1421edddeb4fc?page=1
並獲得響應:
{
"object_id":"0f0b69ae42bc475ab3c1421edddeb4fc",
"object_owner":"[email protected]",
"status":"VALIDATING",
"object_created":"2017-04-16T16:35:24.925Z",
"object_updated":"2017-04-16T16:35:27.143Z",
"metadata":"test",
"default_carrier_account":"9***************b850",
"default_servicelevel_token":"usps_priority",
"label_filetype":"PDF_4x6",
"batch_shipments":{
"count":0,
"next":null,
"previous":null,
"results":{
}
},
"object_results":{
"purchase_succeeded":0,
"purchase_failed":0,
"creation_failed":0,
"creation_succeeded":0
},
"label_url":{
}
}
我不明白的是 - 爲什麼狀態仍在驗證,爲什麼沒有錯誤信息?
看來發生的錯誤發生在更新批處理狀態之前。這似乎讓這些批量更新停留在「VALIDATING」狀態。 – mootrichard
這是因爲'VALIDATING'是批對象的默認狀態。 – mootrichard
所以我的請求有什麼不對,因爲我從支持中瞭解到,它的失敗原因是我使用了發貨對象ID而不是發貨對象數組,但是在api參考中他們寫道我可以使用發貨對象ID或數組... –