Creating a Sepire mail peice

To create a Sepire mail piece, do the following:

  1. Set up the Magic Link app and configure it if you have not done so.
  2. Create the mail peice through the web app or API.

Creating a Sepire mail piece through the web app

To create a Sepire mail piece using the Inkit web app, do the following:

  1. In the Inkit web app, select Documents in the left sidebar. Then click + Create and select Document from the dropdown list.

  2. In the Create Document page, select a template that you want to use to generate the document and click Continue.

  3. In the New Document panel, enter a Name of the document and an optional Description and click Continue.

  4. In the Fill Out Destinations panel, under Merge Fields enter Your Data for each Variable in your template.

    Click + Add.

    In the Add Destination dialog box, select Sepire and click Continue.

    In the Sepire tab, under Recipient Address, enter the following fields:

    • First Name
    • Last Name
    • Address Line 1
    • Address Line 2
    • City
    • State/Province/Region
    • Country
    • ZIP

    Under Mail Product, select the Type from the dropdown box. you can select one of the following options:

    • Letter
    • Postcard

    If you select a Type of Letter, do the following:

    Select one of the following Postage options:

    • Standard
    • First class

    Select one of the following Color options:

    • Black & white
    • Color

    If you to verify the address of the recipient, click on Address verification.

    If you select a Type of Postcard, do the following:

    Select one of the following Postage options:

    • Standard
    • First class

    Select one of the following Size options:

    • 4x6
    • 6x9

    If you to verify the address of the recipient, click on Address verification.

    Finally, click Generate Document.

Creating a Sepire mail piece through the API

To create a Sepire mail piece through the API, generate a document through the API while making Sepire the destination of it.

For example:

📘

Note: When making an API call with the code below, you should replace the sample data with your own.

curl --request POST \ --url https://api.inkit.com/v1/generate \ --header 'Content-Type: application/json' \ --header 'X-Inkit-API-Token: ENTER YOUR API KEY' \ --header 'accept: application/json' \ --data ' { "merge_parameters": { "Name": "John" }, "destinations": { "sepire": { "mail_product_data": { "mail_type": "usps_first_class", "letter_address_placement": "top_first_page", "letter_return_envelope": false, "letter_perforated": 0, "letter_double_sided": false, "letter_color": false }, "mail_product_name": "letter", "verify_address": false, "address_line_1": "1234 Main St.", "address_line_2": "#1", "address_city": "New York", "address_zip": "10001", "address_state": "NY", "address_country": "US", "first_name": "John", "last_name": "Doe" } }, "template_id": "ENTER YOUR TEMPLATE ID" } '
# Import the Inkit Python package import inkit from inkit.exceptions import InkitResponseException # Replace the string below with your API key inkit.api_token = "ENTER YOUR API KEY" try: # Create a PDF document from a template resp = inkit.Render.create( # Specify the ID of the template template_id = "ENTER YOUR TEMPLATE ID", # Specify the data for the Name field merge_parameters = {"Name": "John"}, # Specify the Sepire properties destinations = {"sepire": {"mail_product_data": {"mail_type": "usps_first_class", "letter_address_placement": "top_first_page", "letter_return_envelope": False, "letter_perforated": 0, "letter_double_sided": False, "letter_color": False}, "address_line_1": "1234 Main St.", "address_line_2": "#1", "address_city": "New York", "address_state": "NY", "address_zip": "10001", "address_country": "US", "first_name": "John", "last_name": "Doe", "verify_address": False, "mail_product_name": "letter"}} ) # Print the JSON repsonse of the API call print(resp.data) except InkitResponseException as err: # Print any error print(err.response.data)
// Import the Inkit Node.js package const Inkit = require("inkit"); // Replace the string below with your API key Inkit.apiToken = "ENTER YOUR API KEY"; // Call the PDF renderer createRender(); // Create a PDF document from a template async function createRender() { try { const result = await Inkit.Render.create({ // Specify the ID of the template templateId: 'ENTER YOUR TEMPLATE ID', // Specify the data for the Name field mergeParameters: {"Name": "John"}, // Specify the Sepire properties destinations: {"sepire": {"mail_product_data": {"mail_type": "usps_first_class", "letter_address_placement": "top_first_page", "letter_return_envelope": false, "letter_perforated": 0, "letter_double_sided": false, "letter_color": false}, "address_line_1": "1234 Main St.", "address_line_2": "#1", "address_city": "New York", "address_state": "NY", "address_zip": "10001", "address_country": "US", "first_name": "John", "last_name": "Doe", "verify_address": false, "mail_product_name": "letter"}} }); // Print the JSON response of the API call console.log(JSON.stringify(result.data, null, 3)); } catch (error) { // Print any error console.error(error.response.status, error.response.statusText); } }
{ "id": "rend_7pGnot4dhBUm2Re0EVQgso", "mail_piece_id": "mp_4IDk1YbLznzMiMjaXlXbCS" }

📘

Note: You need to keep track of your mail_piece_id if you want to track the status of it through the API.

You can also generate a Sepire mail piece in the API reference.


Did this page help you?