Ink Cost Calculation

1. Start Ink Cost Calculation for a Motif

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Start an Ink Cost Calculation for a Motif within a Production Job or a Print Order. You get the id of the Motif within a response when creating a Print Order or a Production Job. See Create Print Order and Create Production Job for details. If any corrections on the Motif were made, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

POST /api/v1/motifs/{id}/inkUsages/create

1.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of a Motif
integer (int32)
Body inkUsageRequestOptionsApi required
Parameter to be set for Ink Usage Calculation inkUsageRequestOptionsApi

1.2. Responses

HTTP Code Description Schema
201 Created WorkflowApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

1.3. Consumes

application/json

1.4. Produces

*/*

1.5. Tags

motif-controller-api

1.6. Example HTTP request

Request path

/api/v1/motifs/{id}/inkUsages/create

Request Body

{
  "inkUsageScaleFactor": "ACCURATE",
  "referencedColorPolicyApi": {
    "id": 3
  },
  "referencedCustomerApi": {
    "id": 59
  },
  "referencedSubstrateApi": {
    "id": 5
  }
}

1.7. Example HTTP response

The response contains the id for a Workflow. This is the internal naming convention of the running process. As the Ink Cost Calculation will take some time depending on the size of the motif, you can check the status of this running process with GET /api/v1/workflows/{id}. When the process is finished you can fetch the data as described in the next chapter.

Response 200

{
  "id": 1361,
  "name": "calculate-ink-usage",
  "progress": 0,
  "status": "RUNNING",
  "currentStep": "renderImage",
  "startTimestamp": "2019-07-29T15:26:06.434",
  "executionTime": 0
}
2. Get Ink Cost Calculations for a Motif by ID

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Fetch all processed Ink Cost Calculations for a Motif. If any corrections were made to the Motif, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

GET /api/v1/motifs/{id}/inkUsages

2.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of a Motif
integer (int32)

2.2. Responses

HTTP Code Description Schema
200 OK InkUsageWrapperApi, ReferencedColorPolicyApi, InkUsageApi, ReferencedMotifApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

2.3. Consumes

application/json

2.4. Produces

*/*

2.5. Tags

motif-controller-api

2.6. Example HTTP request

Request path

/api/v1/motifs/{id}/inkUsages

2.7. Example HTTP response

Response 200

[
  {
    "motifReference": {
      "id": 1262
    },
    "colorPolicyReference": {
      "id": 3
    },
    "inkUsages": [
      {
        "id": 1456,
        "tintAreaMm2": 2605.604736,
        "percentage": 10.284392,
        "pixels": 6389661,
        "bits": 1629363765,
        "amountPl": 21085881.299999997,
        "costEuro": 0.00012651528779999998,
        "processColorKey": "CYAN"
      },
      {
        "id": 1459,
        "tintAreaMm2": 2049.905518,
        "percentage": 6.272126,
        "pixels": 5026934,
        "bits": 1281868209,
        "amountPl": 16588882.2,
        "costEuro": 0.0000995332932,
        "processColorKey": "BLACK"
      },
      {
        "id": 1457,
        "tintAreaMm2": 2023.464966,
        "percentage": 8.858232,
        "pixels": 4962094,
        "bits": 1265333971,
        "amountPl": 16374910.2,
        "costEuro": 0.00008187455099999999,
        "processColorKey": "MAGENTA"
      },
      {
        "id": 1458,
        "tintAreaMm2": 843.020996,
        "percentage": 5.764267,
        "pixels": 2067319,
        "bits": 527166562,
        "amountPl": 6822152.699999999,
        "costEuro": 0.000034110763499999996,
        "processColorKey": "YELLOW"
      },
      {
        "id": 1460,
        "tintAreaMm2": 17.773581,
        "percentage": 0.157482,
        "pixels": 43585,
        "bits": 11114358,
        "amountPl": 143830.5,
        "costEuro": 7.191525e-7,
        "processColorKey": "ORANGE"
      },
      {
        "id": 1461,
        "tintAreaMm2": 3.965678,
        "percentage": 0.043332,
        "pixels": 9724,
        "bits": 2479859,
        "amountPl": 32089.199999999997,
        "costEuro": 1.6044599999999998e-7,
        "processColorKey": "VIOLET"
      },
      {
        "id": 1462,
        "tintAreaMm2": 0,
        "percentage": 0,
        "pixels": 0,
        "bits": 0,
        "amountPl": 0,
        "costEuro": 0,
        "processColorKey": "GREEN"
      }
    ]
  }
]
3. Get Ink Cost Calculations for a Motif with a single Color Policy

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Fetch Ink Cost Calculation for a Motif by specifying a single Color Policy.  If any corrections were made to the Motif, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

GET /api/v1/motifs/{id}/inkUsages/{colorPolicyId}

3.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of a Motif
integer (int32)
Path colorPolicyId required
ID of a Color Policy integer (int32)

3.2. Responses

HTTP Code Description Schema
200 OK InkUsageWrapperApi, ReferencedColorPolicyApi, InkUsageApi, ReferencedMotifApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

3.3. Consumes

application/json

3.4. Produces

*/*

3.5. Tags

motif-controller-api

3.6. Example HTTP request

Request path

/api/v1/motifs/{id}/inkUsages/{colorPolicyId}

3.7. Example HTTP response

Response 200

{
  "motifReference": {
    "id": 1028
  },
  "colorPolicyReference": {
    "id": 3
  },
  "inkUsages": [
    {
      "id": 1442,
      "tintAreaMm2": 2345.473877,
      "percentage": 9.015288,
      "pixels": 5751748,
      "bits": 1466695763,
      "amountPl": 18980768.4,
      "costEuro": 0.00011388461040000002,
      "processColorKey": "CYAN"
    },
    {
      "id": 1445,
      "tintAreaMm2": 2064.690674,
      "percentage": 7.076875,
      "pixels": 5063191,
      "bits": 1291113707,
      "amountPl": 16708530.299999999,
      "costEuro": 0.00010025118180000001,
      "processColorKey": "BLACK"
    },
    {
      "id": 1443,
      "tintAreaMm2": 1871.730713,
      "percentage": 7.762772,
      "pixels": 4590000,
      "bits": 1170450036,
      "amountPl": 15147000,
      "costEuro": 0.000075735,
      "processColorKey": "MAGENTA"
    },
    {
      "id": 1444,
      "tintAreaMm2": 842.199402,
      "percentage": 5.318547,
      "pixels": 2065305,
      "bits": 526652818,
      "amountPl": 6815506.5,
      "costEuro": 0.000034077532500000006,
      "processColorKey": "YELLOW"
    },
    {
      "id": 1446,
      "tintAreaMm2": 10.940755,
      "percentage": 0.108152,
      "pixels": 26829,
      "bits": 6841586,
      "amountPl": 88535.7,
      "costEuro": 4.426785e-7,
      "processColorKey": "ORANGE"
    },
    {
      "id": 1447,
      "tintAreaMm2": 3.856912,
      "percentage": 0.041402,
      "pixels": 9458,
      "bits": 2411844,
      "amountPl": 31211.399999999998,
      "costEuro": 1.5605699999999998e-7,
      "processColorKey": "VIOLET"
    },
    {
      "id": 1448,
      "tintAreaMm2": 0,
      "percentage": 0,
      "pixels": 0,
      "bits": 0,
      "amountPl": 0,
      "costEuro": 0,
      "processColorKey": "GREEN"
    }
  ]
}
4. Start Ink Cost Calculation for an Article

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Start an Ink Cost Calculation for an Article.  If any corrections were made to an Article, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

POST /api/v1/articles/{id}/inkUsages/create

4.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of an Article
integer (int32)
Body inkUsageRequestOptionsApi required
Parameters to be set for Ink Usage Calculation inkUsageRequestOptionsApi

4.2. Responses

HTTP Code Description Schema
201 Created WorkflowApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

4.3. Consumes

application/json

4.4. Produces

*/*

4.5. Tags

article-controller-api

4.6. Example HTTP request

Request path

/api/v1/articles/{id}/inkUsages/create

Request Body

{
  "inkUsageScaleFactor": "ACCURATE",
  "referencedColorPolicyApi": {
    "id": 3
  },
  "referencedCustomerApi": {
    "id": 59
  },
  "referencedSubstrateApi": {
    "id": 5
  }
}

4.7. Example HTTP response

The response contains the id for a workflow. This is the internal naming convention of the running process. As the Ink Cost Calculation will take some time depending on the size of the Motif, you can check the status of this running process with GET /api/v1/workflows/{id}. When the process is finished you can fetch the data as described in the next chapter.

Response 200

{
  "id": 1367,
  "name": "calculate-ink-usage",
  "progress": 0,
  "status": "RUNNING",
  "currentStep": "renderImage",
  "startTimestamp": "2019-07-29T15:41:32.922",
  "executionTime": 0
}
5. Get Ink Cost Calculations for an Article by ID

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Fetch all processed Ink Cost Calculations for an Article. If the Response Body shows no content, then an Ink Cost Calculation has to be started first. If any corrections were made to an Article, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

GET /api/v1/articles/{id}/inkUsages

5.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of an Article
integer (int32)

5.2. Responses

HTTP Code Description Schema
200 OK InkUsageWrapperApi, ReferencedColorPolicyApi, InkUsageApi, ReferencedMotifApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

5.3. Consumes

application/json

5.4. Produces

*/*

5.5. Tags

article-controller-api

5.6. Example HTTP request

Request path

/api/v1/articles/{id}/inkUsages

5.7. Example HTTP response

Response 200

[
  {
    "motifReference": {
      "id": 1271
    },
    "colorPolicyReference": {
      "id": 3
    },
    "inkUsages": [
      {
        "id": 1477,
        "tintAreaMm2": 1117544.875,
        "percentage": 50.198576,
        "pixels": 2499071375,
        "bits": 637263200644,
        "amountPl": 8246935537.5,
        "costEuro": 0.049481613224999985,
        "processColorKey": "CYAN"
      },
      {
        "id": 1480,
        "tintAreaMm2": 980550.8125,
        "percentage": 41.691303,
        "pixels": 2192722954,
        "bits": 559144353406,
        "amountPl": 7235985748.2,
        "costEuro": 0.0434159144892,
        "processColorKey": "BLACK"
      },
      {
        "id": 1479,
        "tintAreaMm2": 905278.625,
        "percentage": 41.187327,
        "pixels": 2024398100,
        "bits": 516221515686,
        "amountPl": 6680513730,
        "costEuro": 0.033402568650000006,
        "processColorKey": "YELLOW"
      },
      {
        "id": 1478,
        "tintAreaMm2": 838309.6875,
        "percentage": 41.171056,
        "pixels": 1874641145,
        "bits": 478033492024,
        "amountPl": 6186315778.5,
        "costEuro": 0.0309315788925,
        "processColorKey": "MAGENTA"
      },
      {
        "id": 1482,
        "tintAreaMm2": 232983.1875,
        "percentage": 9.860461,
        "pixels": 521000620,
        "bits": 132855158353,
        "amountPl": 1719302046,
        "costEuro": 0.00859651023,
        "processColorKey": "VIOLET"
      },
      {
        "id": 1481,
        "tintAreaMm2": 25240.234375,
        "percentage": 1.576499,
        "pixels": 56442601,
        "bits": 14392863287,
        "amountPl": 186260583.29999998,
        "costEuro": 0.0009313029165,
        "processColorKey": "ORANGE"
      },
      {
        "id": 1483,
        "tintAreaMm2": 0,
        "percentage": 0,
        "pixels": 0,
        "bits": 0,
        "amountPl": 0,
        "costEuro": 0,
        "processColorKey": "GREEN"
      }
    ]
  }
]
6. Get Ink Cost Calculations for an Article  by single Color Policy

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Fetch processed Ink Cost Calculation for an Article using a single Color Policy.

GET /api/v1/articles/{id}/inkUsages/{colorPolicyId}

6.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of an Article
integer (int32)

6.2. Responses

HTTP Code Description Schema
200 OK InkUsageWrapperApi, ReferencedColorPolicyApi, InkUsageApi, ReferencedMotifApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

6.3. Consumes

application/json

6.4. Produces

*/*

6.5. Tags

article-controller-api

6.6. Example HTTP request

Request path

/api/v1/articles/{id}/inkUsages/{colorPolicyId} 

6.7. Example HTTP response

Response 200

{
  "motifReference": {
    "id": 1142
  },
  "colorPolicyReference": {
    "id": 3
  },
  "inkUsages": [
    {
      "id": 1463,
      "tintAreaMm2": 1634.385498,
      "percentage": 5.696152,
      "pixels": 3875958,
      "bits": 988369403,
      "amountPl": 12790661.399999999,
      "costEuro": 0.00007674396840000001,
      "processColorKey": "CYAN"
    },
    {
      "id": 1464,
      "tintAreaMm2": 327.887573,
      "percentage": 2.342064,
      "pixels": 777588,
      "bits": 198284948,
      "amountPl": 2566040.4,
      "costEuro": 0.000012830202,
      "processColorKey": "MAGENTA"
    },
    {
      "id": 1468,
      "tintAreaMm2": 237.166306,
      "percentage": 1.761575,
      "pixels": 562441,
      "bits": 143422653,
      "amountPl": 1856055.2999999998,
      "costEuro": 0.000009280276499999999,
      "processColorKey": "VIOLET"
    },
    {
      "id": 1466,
      "tintAreaMm2": 178.727097,
      "percentage": 0.798134,
      "pixels": 423852,
      "bits": 108082448,
      "amountPl": 1398711.5999999999,
      "costEuro": 0.000008392269599999999,
      "processColorKey": "BLACK"
    },
    {
      "id": 1465,
      "tintAreaMm2": 98.32756,
      "percentage": 0.797544,
      "pixels": 233184,
      "bits": 59462075,
      "amountPl": 769507.2,
      "costEuro": 0.000003847536,
      "processColorKey": "YELLOW"
    },
    {
      "id": 1467,
      "tintAreaMm2": 0,
      "percentage": 0,
      "pixels": 0,
      "bits": 0,
      "amountPl": 0,
      "costEuro": 0,
      "processColorKey": "ORANGE"
    },
    {
      "id": 1469,
      "tintAreaMm2": 0,
      "percentage": 0,
      "pixels": 0,
      "bits": 0,
      "amountPl": 0,
      "costEuro": 0,
      "processColorKey": "GREEN"
    }
  ]
}
7. Start Ink Cost Calculation for a Production Job

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Start an Ink Cost Calculation for a Production Job. The Production Job has to be imposed first. If any changes to the Print Items were made, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

POST /api/v1/productionJobs/{id}/inkUsages/create

7.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of an Article
integer (int32)
Body inkUsageRequestOptionsApi required
Parameter to be set for Ink Usage Calculation inkUsageRequestOptionsApi

7.2. Responses

HTTP Code Description Schema
200 OK inkUsageRequestOptionsApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

7.3. Consumes

application/json

7.4. Produces

*/*

7.5. Tags

production-job-controller-api

7.6. Example HTTP request

Request path

/api/v1/productionJobs/{id}/inkUsages/create

Request Body

{
  "inkUsageScaleFactor": "ACCURATE"
}

7.7. Example HTTP response

The response contains the id for the Workflow. This is the internal naming convention of the running process. As the Ink Cost Calculation will take some time depending on the size of the Motif, you can check the status of this running process with GET /api/v1/workflows/{id}. When the process is finished you can fetch the data as described in the next chapter.

Response 200

{
  "id": 7621,
  "name": "production-job-calculate-ink-usage",
  "progress": 0,
  "status": "RUNNING",
  "currentStep": "renderTask",
  "startTimestamp": "2019-09-26T15:17:09.783",
  "executionTime": 0
}
8. Get Ink Cost Calculations for a Production Job by ID

Compatibility: from Durst Workflow v1.7.6

Available in
Durst Workflow Print Label +
Durst Workflow Print +

Fetch all processed Ink Cost Calculations for a Production Job. If the Response Body shows no content, then an Ink Cost Calculation has to be started first. If any corrections to the Print Items were made, or a Fixup was applied, the Ink Cost Calculation has to be initiated again.

GET /api/v1/productionJobs/{id}/inkUsages

8.1. Parameters

Type
Name
Description
Schema
Path
id required
The id of a Production Job
integer (int32)

8.2. Responses

HTTP Code Description Schema
200 OK InkUsageWrapperApi, ReferencedColorPolicyApi, InkUsageApi, ReferencedMotifApi, ReferencedProductionJobApi
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

8.3. Consumes

application/json

8.4. Produces

*/*

8.5. Tags

production-job-controller-api

8.6. Example HTTP request

Request path

/api/v1/productionJobs/{id}/inkUsages

8.7. Example HTTP response

Response 200

{
  "productionJobReference": {
    "id": 1383
  },
  "colorPolicyReference": {
    "id": 61
  },
  "inkUsages": [
    {
      "id": 3924,
      "tintAreaMm2": 13778.171875,
      "percentage": 52.349712,
      "pixels": 34822507,
      "bits": 8879739490,
      "amountPl": 114914273.1,
      "costEuro": 0,
      "processColorKey": "BLACK"
    },
    {
      "id": 3921,
      "tintAreaMm2": 13379.181641,
      "percentage": 55.546074,
      "pixels": 33814110,
      "bits": 8622598242,
      "amountPl": 111586563,
      "costEuro": 0,
      "processColorKey": "CYAN"
    },
    {
      "id": 3922,
      "tintAreaMm2": 10676.200195,
      "percentage": 50.635874,
      "pixels": 26982684,
      "bits": 6880584555,
      "amountPl": 89042857.19999999,
      "costEuro": 0,
      "processColorKey": "MAGENTA"
    },
    {
      "id": 3923,
      "tintAreaMm2": 2961.598877,
      "percentage": 23.766436,
      "pixels": 7485049,
      "bits": 1908687673,
      "amountPl": 24700661.7,
      "costEuro": 0,
      "processColorKey": "YELLOW"
    }
  ]
}