Retrieve Mail Piece Status

Retrieves information about the delivery status of a Sepire mail piece

Endpoint URLSDK Method
https://api.inkit.com/v1/mail-piece/{mailPieceId} (GET)N/A

Request properties

PropertyTypeRequiredDescription
mailPieceIdStringYesThe ID of a Sepire mail piece that was previously created.

Response properties

PropertyTypeDescription
address_cityStringThe recipient's city.
address_countryStringThe recipient's country.
address_line_1StringThe first line of the recipient's address.
address_line_2StringThe second line of the recipient's address.
address_placementStringWhether the placement of the address is top_first_page or insert_blank_page.
address_stateStringThe recipient's state.
address_verification_failed_atStringThe date and time the address verification failed.
address_zipStringThe recipient's zip code.
colorBooleanWhether output should be in color.
companyString
created_atStringThe date and time when the mail piece was created.
double_sidedBooleanWhether output should be double-sided.
first_nameStringThe recipient's first name.
heightFloatThe height of the document.
idStringThe ID of the mail piece.
imbStringThe USPS IMb tracking code.
in_local_area_atStringThe date and time the mail piece arrived in the local area.
in_transit_atStringThe date and time the mail piece entered transit.
last_nameStringThe recipient's last name.
latest_delivery_statusStringThe latest delivery status of the mail piece.
mail_product_nameStringWhether the product is a letter or a postcard.
mail_typeStringWhether delivery is usps_first_class or usps_standard.
mailed_atStringThe date and time the mail piece was mailed.
perforatedIntegerWhether perforated (1) or not (0).
processed_for_delivery_atStringThe date and time the mail piece was processed for delivery.
render_idStringThe Render ID of the document.
rerouted_atStringThe date and time the mail piece was rerouted.
return_envelopeBooleanWhether to include a return envelope.
returned_to_sender_atStringThe date and time the mail piece was returned to sender.
sizeStringThe postcard size.
statusStringThe overall status of the mail piece.
template_idStringThe ID of the template used to generate the document.
template_nameStringThe name of the template used to generate the document.
template_versionIntegerThe version of the template used to generate the document.
unitStringThe unit of measurement for documents generated by the template. Valid values are in and cm.
verify_addressBooleanWhether to verify the address.
widthFloatThe width of the document.

latest_delivery_status

StringDescription
mailedThe mail piece was sent to Sepire.
address_verification_failedAddress verification of the mail piece failed.
in_transitThe mail piece is in transit.
in_local_areaThe mail piece is in the local area.
reroutedThe mail piece was rerouted.
processed_for_deliveryThe mail piece was processed for delivery.
returned_to_senderThe mail piece was returned to sender.

Example request and response

curl --request GET \
     --url https://api.inkit.com/v1/mail-piece/ENTER_YOUR_MAIL_PIECE_ID \
     --header 'X-Inkit-API-Token: ENTER YOUR API KEY' \
     --header 'accept: application/json'
{
   "address_city":"New York",
   "address_country":"US",
   "address_line_1":"1234 Main St.",
   "address_line_2":"#1",
   "address_placement":"top_first_page",
   "address_state":"NY",
   "address_verification_failed_at":null,
   "address_zip":"10001",
   "color":false,
   "company":"",
   "created_at":"2023-08-31T16:59:16.639084Z",
   "double_sided":false,
   "first_name":"John",
   "height":11.0,
   "id":"mp_4IDk1YbLznzMiMjaXlXbCS",
   "imb":null,
   "in_local_area_at":null,
   "in_transit_at":null,
   "last_name":"Doe",
   "latest_delivery_status":null,
   "mail_product_name":"letter",
   "mail_type":"usps_first_class",
   "mailed_at":null,
   "perforated":0,
   "processed_for_delivery_at":null,
   "render_id":"rend_7pGnot4dhBUm2Re0EVQgso",
   "rerouted_at":null,
   "return_envelope":false,
   "returned_to_sender_at":null,
   "size":null,
   "status":"failed",
   "template_id":"tmpl_4UDp3vSa3z3ithp6qgyFtj",
   "template_name":"Mail Merge",
   "template_version":8,
   "unit":"in",
   "verify_address":false,
   "width":8.5
}