The instructions here apply only to customers who have a Flatfile account set up in in a region other than the United States. If you would like help setting up Flatfile on an account outside the United States, please contact Support@Flatfile.com for help.
For Flatfile Portal 3.0
When you embed your Portal, you'll be using the following code for the Portal:
export function importData() {
Flatfile.requestDataFromUser({
});
}
In your code, please replace that line with these 3 lines, which include additional variables:
export function importData() {
Flatfile.requestDataFromUser({
apiUrl: "[API-URL-HERE]",
mountUrl: "[APP-URL-HERE]",
});
}
The international API URLs are:
- For the EU: https://api.eu0.flatfile.com
- For the UK: https://api.uk0.flatfile.com
- For Canada: https://api.ca0.flatfile.com
- For Germany: https://api.de0.flatfile.com
- For Australia: https://api.aus0.flatfile.com
The international app URLS are:
- For the EU: https://app.eu0.flatfile.com
- For the UK: https://app.uk0.flatfile.com
- For Canada: https://app.ca0.flatfile.com
- For Germany: https://app.de0.flatfile.com
- For Australia: https://app.aus0.flatfile.com
And that's it! Once those changes are made, everything should work smoothly.
For Flatfile's Platform SDK Starter
After you have installed the Platform SDK Starter, you will need to update the API URL it is using in order to deploy to one of our international servers.
To do so, edit the .env file stored in your root directory for the Platform SDK Starter, and update the FLATFILE_API_URL=
to match the API URL of the server you will be deploying to.
It can also be passed to the publish command via the --api-url
option.
The international API URLs are:
- For the EU: https://api.eu0.flatfile.com
- For the UK: https://api.uk0.flatfile.com
- For Canada: https://api.ca0.flatfile.com
- For Germany: https://api.de0.flatfile.com
- For Australia: https://api.aus0.flatfile.com
For Flatfile Portal 2.0
Setting up Flatfile Portal 2.0 on Flatfile’s international servers is a simple two step process.
- Add a few lines of code to your importer configuration
- Update your license key to your new international key
Configuring the Importer
To enable Portal 2.0 to work on Flatfile’s international servers, you will need to add a few lines of additional code to your importer configuration. The additional code looks like this (where “INTERNATIONAL-URL-HERE” is replaced by the correct international URL for your region):
FlatfileImporter.setMountUrl(
"https://portal-2.flatfile.io/?key=:key&domain=[INTERNATIONAL-URL-HERE]"
);
Within the importer, it looks like this:
importFlatfileImporterfrom"@flatfile/adapter";
import$from"jquery";
import { format, isDate, isFuture, parseISO } from"date-fns";
importcountriesfrom"../countries";
import { schemas } from"./schemas";
const { contactSchema } =schemas;
constimporter=newFlatfileImporter(
"5e4ak4ka-f00b-5b0a-aa09-eab0cbe7acb6",
contactSchema
);
FlatfileImporter.setMountUrl(
"https://portal-2.flatfile.io/?key=:key&domain=[INTERNATIONAL-URL-HERE]"
);
importer.setCustomer({
userId: "12345",
name: "Foo Bar"
});
The international URLs are:
- For the EU: https://api.eu0.flatfile.com
- For the UK: https://api.uk0.flatfile.com
- For Canada: https://api.ca0.flatfile.com
- For Germany: https://api.de0.flatfile.com
- For Australia: https://api.aus0.flatfile.com
Updating the License Key
Next, update your license key to your new EU key. To find your EU key, log in to your account using the appropriate international URL and click the Portal link in the navigation pane. In the Portal tab, click on the link under "Looking for your Portal 2.0 license key? Go here" and you'll see a box with your license key. Copy and paste that value into your code.
Comments
0 comments
Please sign in to leave a comment.