Invoice Jobs
Endpoint for creating a job that triggers invoice creation. There are two types of jobs: manual and automatic.
Manual - takes
orderIdsfrom which the invoices should be created. TheorderIdscome from the request payload.Automatic - performs a query to find orders that are ready for invoice generation based on configured parameters. The query parameters are defined in configuration service.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$A list of order IDs for which the invoices should be created.
A job type determines if the orders are searched automatically based on parameters configured in configuration service or are manually provided in orderIds array.
Invoices job created. The job ID is returned.
The created job ID.
Bad Request
Forbidden
Internal Server Error
POST /invoice/{tenant}/jobs/invoices HTTP/1.1
Host: api.emporix.io
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"orderIds": [
"sampleOrderId1",
"sampleOrderId2"
],
"jobType": "MANUAL"
}{
"jobId": "sampleJobId"
}Returns the job status and details about the processed orders.
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$Unique identifier of an invoice job.
Returned when job exists
Status of the processed job. Possible values: DONE, IN_PROGRESS
Job type determines if the orders are provided manually or searched by a parametrized query.
Forbidden
Returned when a job doesn't exist.
Internal Server Error
GET /invoice/{tenant}/jobs/invoices/{jobId} HTTP/1.1
Host: api.emporix.io
Accept: */*
{
"status": "IN_PROGRESS"
}Last updated
Was this helpful?

