Currently the document batch upload can be done with the same endpoints as validation & document creation. This is completely undocumented (and impossible to document) by our Swagger document. It also makes the code more complicated. This is all inherited from the old API.
The new process goes like this:
Create a batch job by sending a documents array with POST /documents/batch (returns { id: string, phase: "VALIDATING", status: { processed, total, percentage } })
The batch job status can be tracked by GET /documents/batch/:id (the id returned in step 1)
Once the phase is "VALIDATED", the job can be requested to be sent to the store with POST /documents/batch/:id
The batch job status can be tracked by GET /documents/batch/:id (the id returned in step 1). The job has now phase: "SENDING"
Once the status' validated is true, the job can be requested to be sent to the store with POST /documents/batch/:id. Once done, the job has phase: "SENT"
Currently the document batch upload can be done with the same endpoints as validation & document creation. This is completely undocumented (and impossible to document) by our Swagger document. It also makes the code more complicated. This is all inherited from the old API.
The new process goes like this:
/documents/batch
(returns{ id: string, phase: "VALIDATING", status: { processed, total, percentage } }
)/documents/batch/:id
(the id returned in step 1)phase
is"VALIDATED"
, the job can be requested to be sent to the store with POST/documents/batch/:id
/documents/batch/:id
(the id returned in step 1). The job has nowphase: "SENDING"
validated
istrue
, the job can be requested to be sent to the store with POST/documents/batch/:id
. Once done, the job hasphase: "SENT"