---
title: "Create a Print-Job cost calculation"
method: POST
path: "/print-job-cost-calculations/"
tags: ["Print-Job Cost Calculations"]
---

# Create a Print-Job cost calculation

`POST /print-job-cost-calculations/`

## Request

- Base URL: `https://api.lulu.com`
- URL: `https://api.lulu.com/print-job-cost-calculations/`
- Auth: OAuth 2
  - Client credentials
  - Implicit: `https://api.lulu.com/auth/realms/glasstree/protocol/openid-connect/auth?nonce=jwt_login`
  - Password
  - Token URL: `https://api.lulu.com/auth/realms/glasstree/protocol/openid-connect/token`
- TypeScript: <https://skmtc.dev/lulu/apis/universal-publishing-platform-api/docs/print-job-cost-calculations/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows you to calculate product and shipping cost without creating a Print-Job. Typically used in an offer or checkout situation. The address is required to calculate sales tax / VAT and shipping cost.

## Request body

- object: A Print-Job Cost Calculation represents a price calculation for multiple print job line items
  - `line_items` object[], required: The line items that should be calculated
    - `page_count` integer, required: The page count of the book
    - `pod_package_id` string, required: The id of the PodPackage of the book
    - `quantity` number, required: The quantity of printables to base the calculations on
  - `shipping_address` object, required: The shipping address for calculating Print-Job cost
    - `city` string, required
    - `country_code` string, required: [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
    - `email` string, email
    - `is_business` boolean: Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.
    - `name` string: Full name of the person, including first and last name.
    - `organization` string: Name of an organization. Required if no person name is given.
    - `phone_number` string, required: Validation Regex Pattern: `^\+?[\d\s\-.\/()]{8,20}$`
    - `postcode` string, required: Required for most countries
    - `state_code` string: 2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)). They are required for some countries (e.g. US, MX, CA, AU)
    - `street1` string, required: First address line
    - `street2` string: Second address line
    - `title` 'MR' | 'MISS' | 'MRS' | 'MS' | 'DR'
  - `shipping_option` 'MAIL' | 'PRIORITY_MAIL' | 'GROUND_HD' | 'GROUND_BUS' | 'GROUND' | 'EXPEDITED' | 'EXPRESS', required: The shipping option level

## Response `201`

Created

- object: Summary of the costs of a Print-Job
  - `shipping_address` object: The shipping address of the customer.
    - `city` string
    - `country_code` string: [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
    - `email` string, email: Shipping carriers require an email address for notifications or handling delivery issues. If no email is given, the default email in the user profile will be used.
    - `is_business` boolean: Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.
    - `name` string: Full name of the person, including first and last name.
    - `organization` string: Name of an organization. Required if no person name is given.
    - `phone_number` string: Shipping carriers require a phone number for handling delivery issues. If no phone number is given, the default in the API user profile will be used. Validation Regex Pattern for phone numbers `^\+?[\d\s\-.\/()]{8,20}$`
    - `postcode` string: Required for most countries
    - `state_code` string: 2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)). They are required for some countries (e.g. US, MX, CA, AU)
    - `street1` string: First address line
    - `street2` string: Second address line
    - `title` 'MR' | 'MISS' | 'MRS' | 'MS' | 'DR'
    - `warnings` object[]: Warnings found during address validation
      - `type` string: Type of warning
      - `code` string: Warning code which describe what was suggested by validation
      - `path` string: Describes the validation origin of warning
      - `message` string: Warning message with suggested change
    - `suggested_address` object: Suggested address returned by shipping address validation
      - `country_code` string: Suggested country code
      - `state_code` string: Suggested state code
      - `postcode` string: Suggested postal code
      - `city` string: Suggested city
      - `street1` string: Suggested first address line
      - `street2` string: Suggested second address line
  - `currency` string, required: Currency for the costs
  - `line_item_costs` object[], required: List of cost summaries for each line item
    - `cost_excl_discounts` string, required: Per unit cost without any discounts applied as a decimal string
    - `discounts` object[], required: Discounts applied to this line item
      - `amount` string, required: The deducted amount as a decimal string
      - `description` string, required: Description of the discount
    - `quantity` number, required: The quantity of printables to base the calculations on
    - `tax_rate` string, required: The tax rate applied to the line as a decimal string
    - `total_cost_excl_discounts` string, required: The total line price without any discounts applied as a decimal string
    - `total_cost_excl_tax` string, required: The total line price including discounts excluding tax as a decimal string
    - `total_cost_incl_tax` string, required: The total line price including discounts and taxes as a decimal string
    - `total_tax` string, required: The total line tax amount as a decimal string
    - `unit_tier_cost` string: Per unit cost with tier discount applied, null for list price (non-tier) customers
  - `shipping_cost` object, required: Summary of the combined shipping and handling costs
    - `tax_rate` string: Tax rate that was applied on shipping and handling costs as a decimal string
    - `total_cost_excl_tax` string: Total shipping and handling costs excluding taxes as a decimal string
    - `total_cost_incl_tax` string: Total shipping and handling costs including taxes as a decimal string
    - `total_tax` string: Total amount of taxes on shipping and handling as a decimal string
  - `fulfillment_cost` object: Summary of the fulfillment fee costs
    - `total_cost_excl_tax` string: Total fulfillment fee costs excluding taxes as a decimal string
    - `total_cost_incl_tax` string: Total fulfillment fee costs including taxes as a decimal string
    - `total_tax` string: Total amount of taxes on fulfillment fee as a decimal string
    - `tax_rate` unknown
  - `total_cost_excl_tax` string, required: Total costs of the job excluding taxes as a decimal string
  - `total_cost_incl_tax` string, required: Total costs of the job including taxes as a decimal string
  - `total_discount_amount` string, required: The total discount amount as a decimal string
  - `total_tax` string, required: Total amount of taxes on the job as a decimal string
  - `fees` object[]: All fees applied to Print Job
    - `currency` string: Print Job Fee currency
    - `fee_type` string: Print Job Fee type
    - `sku` string: Print Job Fee unique sku
    - `tax_rate` string: The tax rate applied to the fee as a decimal string
    - `total_cost_excl_tax` string: The total fee rate excluding tax as a decimal string
    - `total_cost_incl_tax` string: The total fee rate including tax as a decimal string
    - `total_tax` string: The total fee rate tax amount as a decimal string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-09-30** `fa5a6116f26b`: 5 warning
  - the `shipping_address/city` request property's maxLength was set to `30`
  - the `shipping_address/name` request property's maxLength was set to `35`
  - the `shipping_address/organization` request property's maxLength was set to `30`
  - the `shipping_address/street1` request property's maxLength was set to `30`
  - …1 more
- **2024-08-22** `692a2290ef22`: 4 info
  - added the non-success response with the status `404`
  - added the optional property `fees` to the response with the `201` status
  - added the optional property `fulfillment_cost` to the response with the `201` status
  - added the optional property `shipping_address` to the response with the `201` status

[Operation history](https://skmtc.dev/lulu/apis/universal-publishing-platform-api/changes/print-job-cost-calculations/post.md)

---

[API](https://skmtc.dev/lulu/apis/universal-publishing-platform-api.md) - [All operations](https://skmtc.dev/lulu/apis/universal-publishing-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lulu/apis/universal-publishing-platform-api/revisions/fa5a6116f26b?raw)
