List Self Mailers
print_mail.self_mailers.list(SelfMailerListParams**kwargs) -> SyncSkipLimit[SelfMailer]
GET/print-mail/v1/self_mailers
Get a list of self-mailers.
Parameters
search: Optional[str]
You can supply any string to help narrow down the list of resources. For example, if you pass "New York" (quoted), it will return resources that have that string present somewhere in their response. Alternatively, you can supply a structured search query. See the documentation on StructuredSearchQuery for more details.
List Self Mailers
import os
from postgrid import PostGrid
client = PostGrid(
print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"), # This is the default and can be omitted
)
page = client.print_mail.self_mailers.list()
page = page.data[0]
print(page.id){
"object": "list",
"limit": 10,
"skip": 0,
"totalCount": 1,
"data": [
{
"id": "self_mailer_123456",
"object": "self_mailer",
"status": "ready",
"live": false,
"to": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"from": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"size": "8.5x11_bifold",
"sendDate": "2020-11-12T23:23:47.974Z",
"createdAt": "2020-11-12T23:23:47.974Z",
"updatedAt": "2020-11-12T23:23:47.974Z",
"mailingClass": "first_class"
}
]
}Returns Examples
{
"object": "list",
"limit": 10,
"skip": 0,
"totalCount": 1,
"data": [
{
"id": "self_mailer_123456",
"object": "self_mailer",
"status": "ready",
"live": false,
"to": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"from": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"size": "8.5x11_bifold",
"sendDate": "2020-11-12T23:23:47.974Z",
"createdAt": "2020-11-12T23:23:47.974Z",
"updatedAt": "2020-11-12T23:23:47.974Z",
"mailingClass": "first_class"
}
]
}