Lob¶
The Lob modules allow you to send letters, postcards and verify the US and international addresses in your Lob account.
Getting Started with Lob¶
Prerequisites
- A Lob account
In order to use Lob with Ibexa Connect, it is necessary to have a Lob account. You can use your Google account or create a Lob account at lob.com.
Note
The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!
Connecting Lob to Ibexa Connect¶
To connect your Lob account to Ibexa Connect you need to obtain the API Key from your Lob account and insert it in the Create a connection dialog in the Ibexa Connect module.
-
Login to your Lob account.
-
Click your profile icon > Settings > API Keys.
-
Copy the required API Key to establish the connection.
-
Go to Ibexa Connect and open the Lob module's Create a connection dialog.
-
In the Connection name field, enter a name for the connection.
-
In the API Key field, enter the API key copied in step 3 and click Continue.
The connection has been established.
Actions¶
Send a Letter¶
Creates a new letter.
File |
Enter an HTML string or File ID of a saved HTML template or a remote URL or a local upload of an HTML or PDF file. The HTML string should be under 10000 characters. |
Color |
Select the color:
|
Name |
Enter the name of the person to whom you are sending the letter. |
Address Line 1 |
Enter the street address. |
Address Line 2 |
Enter the street address. |
City |
Enter the city name. |
State |
Enter the state name. |
Zip Code |
Enter the zip code of the area. |
Company |
Enter the name of the company where the person works. |
Phone |
Enter the phone number of the person to whom you are sending the letter. |
Enter the email address of the person. |
|
Name |
Enter the name of the person who is sending the letter. |
Address Line 1 |
Enter the street address. |
Address Line 2 |
Enter the street address. |
City |
Enter the city name. |
State |
Enter the state name. |
Zip Code |
Enter the zip code of the area. |
Company |
Enter the name of the company where the person works. |
Phone |
Enter the phone number of the person who is sending the letter. |
Enter the email address of the person. |
|
Address Placement |
Select the placement for address:
|
Double-Sided |
Select whether you want to print the letter double-sided:
|
Description |
Enter the details of the letter. |
Mail Type |
Select the mail type:
|
Return Envelope |
Select whether you want to include a return envelope in the letter:
|
Perforated Page |
Enter the number of perforated pages to include with the return envelope. |
Extra Service |
Select the service:
|
Send Date |
Enter the date when the letter should be sent. |
Send a Postcard¶
Creates a new postcard.
Name |
Enter the name of the person to whom you are sending the postcard. |
Address Line 1 |
Enter the street address. |
Address Line 2 |
Enter the street address. |
City |
Enter the city name. |
State |
Enter the state name. |
Zip Code |
Enter the zip code of the area. |
Company |
Enter the name of the company where the person works. |
Phone |
Enter the phone number of the person to whom you are sending the postcard. |
Enter the email address of the person. |
|
Name |
Enter the name of the person who is sending the postcard. |
Address Line 1 |
Enter the street address. |
Address Line 2 |
Enter the street address. |
City |
Enter the city name. |
State |
Enter the state name. |
Zip Code |
Enter the zip code of the area. |
Company |
Enter the name of the company where the person works. |
Phone |
Enter the phone number of the person who is sending the postcard. |
Enter the email address of the person. |
|
Postcard Front |
Enter an HTML string or File ID of a saved HTML template or a remote URL or a local upload of an HTML or PDF file that appears on the front side of the postcard. The HTML string should be under 10000 characters. |
Postcard Back |
Enter an HTML string or File ID of a saved HTML template or a remote URL or a local upload of an HTML or PDF file that appears on the backside of the postcard. The HTML string should be under 10000 characters. |
Description |
Enter the details of the postcard. |
Postcard Size |
Select the size of the postcard:
|
Mail Type |
Select the mail type:
|
Send Date |
Enter the date on which the postcard should be sent to the sender. |
Verify a US Address¶
Corrects and standardizes a US address.
Primary Line | Enter the street address. |
City | Enter the city name. |
State | Enter the state name. |
Recipient | Enter the recipient's name. |
Secondary Line | Enter the street or locality name. |
Zip Code | Enter the area zip code. |
Urbanization | Enter the urbanization code. Applicable only for addresses in Puerto Rico |
Verify an International Address¶
Corrects and standardizes an international address.
Primary Line | Enter the street address. |
Country | Enter the two-digit country code. For example, US . |
Secondary Line | Enter the street or locality name. |
Recipient | Enter the recipient's name. |
City | Enter the city name. |
State | Enter the state name. |
Postal Code | Enter the area postal code. |
Make an API Call¶
Performs an arbitrary authorized API call.
URL |
Enter a path relative to | For the list of available endpoints, refer to the Lob API Documentation. |
Method
Select the HTTP method you want to use:
GET
to retrieve information for an entry.
POST
to create a new entry.
PUT
to update/replace an existing entry.
PATCH
to make a partial entry update.
DELETE
to delete an entry.
Headers
Enter the desired request headers. You don't have to add authorization headers; we already did that for you.
Query String
Enter the request query string.
Body
Enter the body content for your API call.
Example of Use - List Letters¶
The following API call returns all the letters from your Lob account:
URL:
/v1/letters
Method:
GET
Matches of the search can be found in the module's Output under Bundle > Body > data.
In our example, 10 were returned: