Reuse Prior Authorization (Platform Prefill)
Learn how to add a new Location to your existing Organization and authorize it to receive mail using our platform prefill feature.
This feature is available to Stable platform partners. To learn more, see Stable for Platforms or reach out to us: Support.
Overview
The Platform Prefill feature allows Stable platform partners to synchronously create a fully-onboarded Location using the API. This bypasses the standard multi-step onboarding flow and generates a signed USPS Form 1583 automatically at the time of creation.
The United States Postal Service requires Stable to store a signed copy of USPS Form 1583 in order to authorize mail reception at your Location.
This guide walks you through the process of using the platformPrefill parameter with the POST /v1/locations endpoint to prefill and create fully onboarded Location.
You'll learn how to:
- Use the
platformPrefillparameter to onboard Locations in one step - Understand how to create recipients and understand deduplication behavior.
Prerequisites
Before you begin, you’ll need:
- A Stable API key
- Platform access to the Platform Prefill feature
- Platform Prefill feature is not available to all customers. To request access, contact [email protected] or reach out to your Customer Success Manager
- The required 1583 platform prefill information input, including:
- For business submissions: legal name, business type, and place of registration
- For all submissions: at least one individual recipient
Authentication
All API requests require Authentication using your API key in the x-api-key header:
curl -H "x-api-key: your-api-key" https://api.usestable.com/v1/...const fetch = require('node-fetch');
const url = 'https://api.usestable.com/v1/locations';
const options = {
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
// ...
};
fetch(url, options)
.then(response => console.log('Response:', response.json())
.catch(error => console.error('Error:', error));import requests
url = 'https://api.usestable.com/v1/...'
headers = {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
}
response = requests.get(url, headers=headers)
if response.ok:
print(response.json())
else:
print(f"Error: {response.status_code}, {response.text}")Process Overview
When using the Platform Prefill feature, creation and onboarding works in a single step.
Step 1: Creating a Location
Start by creating a new Location that will receive mail.
- You'll need to specify a location code from our list of available facilities.
- You should also decide whether to enable
autoScan. WhenautoScanis enabled, every piece of mail received at thisLocationwill have its contents opened, scanned, and uploaded, in addition to the outer envelope. - Choose whether to submit a business or individual type Form 1583:
- For business: use
platformPrefill.businessto provide business details. - For individual: omit the
businessobject.
- For business: use
- Include recipient information:
platformPrefill.recipients.individualis required in all cases.platformPrefill.recipients.businesscan be included for business submissions.- Business recipients are auto-deduplicated based on
legalBusinessName.
curl -X POST https://api.usestable.com/v1/locations \
-H "x-api-key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"locationCode": "SFO1",
"autoScan": true,
"platformPrefill": {
"business": {
"legalBusinessName": "Stable",
"placeOfRegistration": "San Franciso, CA",
"businessType": "Software"
},
"recipients": {
"individual":[{
"firstName": "Jack",
"lastName": "Postal"
}]
}
}
}'const fetch = require('node-fetch');
const url = 'https://api.usestable.com/v1/locations';
const options = {
method: 'POST',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
locationCode: 'SFO1',
autoScan: true,
platformPrefill: {
business: {
legalBusinessName: "Stable",
placeOfRegistration: "San Franciso, CA",
businessType: "Software"
},
recipients: {
individual:[{
firstName: "Jack",
lastName: "Postal"
}]
}
}
}),
};
fetch(url, options)
.then(response => console.log('Response:', response.json())
.catch(error => console.error('Error:', error));import requests
url = 'https://api.usestable.com/v1/locations'
headers = {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
}
payload = {
'locationCode': 'SFO1',
'autoScan': True,
'platformPrefill': {
'business': {
'legalBusinessName': 'Stable',
'placeOfRegistration': 'San Franciso, CA',
'businessType': 'Software'
},
'recipients': {
'individual':[{
'firstName': 'Jack',
'lastName': 'Postal'
}]
}
}
}
response = requests.post(url, headers=headers, json=payload)
if response.ok:
print(response.json())
else:
print(f"Error: {response.status_code}, {response.text}")Response
{
"id": "6510b338-57d9-4aac-8e84-fb047ae42e86",
"status": "active",
"address": {
"line1": "2261 Market Street",
"line2": "#4962",
"city": "San Francisco",
"state": "CA",
"postalCode": "94114"
},
"type": "cmra",
"onboarding": {
"status": "complete"
}
}
Location StatusWhen created using the Platform Prefill feature, your
Locationwill have an onboarding status ofcomplete. This indicates it's ready to receive mail.
Webhook Notifications
A location.created webhook event will be dispatched after successful Location creation.
{
"data": {
"status": "active",
"address": {
"city": "San Francisco",
"line1": "123 Main St",
"line2": "#4962",
"postalCode": "94105",
"state": "CA"
},
"id": "70a3d702-bf1d-4153-8eb2-d3d889aff7f0",
"metadata": null,
"onboarding": {
"status": "complete"
},
"type": "cmra"
},
"eventType": "location.created"
}Error Handling
Feature not enabled
{
"status": 403,
"message": "Your account does not have access to the platform prefill feature. Please contact support for assistance."
}Bad input
{
"status": 400,
"message": "At least one individual recipient is required"
}Updated 18 days ago
