detect-address
endpoint accepts either a letter in PDF format or an address string and attempts to convert it to a standard address format. Note that the PDF should be in standard address format, having the recipient's name and address listed at the top.base64
encoding. In this case, submit the base64
-encoded PDF file contents in the content
field of the request body.address
field of the request body.curl --location --request POST 'https://rest.clicksend.com/v3/post/letters/detect-address' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": "Q29udGVudHMgb2YgZmlsZQ=="
}'
{
"data": {
"address_city": "Perth",
"address_country": "AU",
"address_line_1": "123 Main Street",
"address_line_2": "",
"address_name": "John Doe",
"address_postal_code": "6000",
"address_state": "WA"
},
"http_code": 200,
"response_code": "SUCCESS",
"response_msg": "Here is your result."
}