Invoice Service (1.0.0)

Download OpenAPI specification:Download

The Emporix Invoice Service can be used for invoices generation based on provided order IDs.


Key Features:

  • Creating invoice jobs
  • Getting information about invoice jobs status

Key Benefits:

  • Orchestrating the process that generates invoices based on the provided orders

Invoice Jobs

Creating a job that starts an invoice creation

Endpoint for creating a job that triggers invoice creation. There are two types of jobs: manual and automatic.

  1. Manual - takes orderIds from which the invoices should be created. The orderIds come from the request payload.
  2. 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.
Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

Request Body schema: application/json
orderIds
Array of strings

A list of order IDs for which the invoices should be created.

jobType
required
string

A job type determines if the orders are searched automatically based on parameters configured in configuration service or are manually provided in orderIds array.

Enum: "AUTOMATIC" "MANUAL"
Responses
201

Invoices job created. The job ID is returned.

400

Bad Request

403

Forbidden

500

Internal Server Error

post/{tenant}/jobs/invoices
Request samples
application/json
{
  • "orderIds": [
    ],
  • "jobType": "MANUAL"
}
Response samples
application/json
{
  • "jobId": "sampleJobId"
}

Returning a job status and order details

Returns the job status and details about the processed orders.

Request
path Parameters
tenant
required
string [ 3 .. 16 ] characters ^[a-z][a-z0-9]+$

The tenant that the caller is acting upon.

Please note that this value is always lowercase.

jobId
required
string

Unique identifier of an invoice job.

Responses
200

Returned when job exists

403

Forbidden

404

Returned when a job doesn't exist.

500

Internal Server Error

get/{tenant}/jobs/invoices/{jobId}
Request samples
Response samples
application/json
{
  • "status": "IN_PROGRESS"
}