import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.communication.send_letter(
document={
"id": "id",
"file_name": "fileName",
},
to_address={
"address": {
"city": "city",
"state": "state",
"street_lines": ["string"],
"zip_code": "zipCode",
},
"name": "name",
},
)
print(response.tracking_id){
"trackingId": "<string>"
}Sends a physical letter. The document must be a PDF file. Returns an ID for tracking.
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.communication.send_letter(
document={
"id": "id",
"file_name": "fileName",
},
to_address={
"address": {
"city": "city",
"state": "state",
"street_lines": ["string"],
"zip_code": "zipCode",
},
"name": "name",
},
)
print(response.tracking_id){
"trackingId": "<string>"
}A unique identifier for the request. If the same request is sent with the same idempotency key, it will be ignored.
Letter sent successfully
Letter sent successfully
The letter ID for tracking the mail delivery