Build customer integrations fast
Customer Integration APIs
Customer Integration APIs – Locate2u
What are Customer Integration APIs?
Customer Integration APIs provide a secure, programmatic way to interact with the Locate2u platform. These APIs enable your systems to create stops, manage webhooks, and retrieve user information directly from your own applications. Instead of manually entering data into the Locate2u portal, you can automate your workflows and keep your systems synchronized in real-time.
How Customer Integration APIs Help Your Business
Customer Integration APIs in Locate2u are designed for building customer-specific integrations within your own Locate2u account. Unlike the core api.locate2u.com, which is primarily used for platform-wide and operational workflows, the Customer Integration API allows you to create integrations that are scoped to an individual customer. This makes it ideal when you need to import data, trigger automations, or receive webhook events only for a specific customer’s stops, jobs, or orders. Using these APIs, you can automate customer imports, create and manage customer-specific stops, and subscribe to webhook events that fire exclusively for that customer’s data. This ensures clean separation between customers, reduces unnecessary data processing, and enables safer, more targeted integrations.
When to Use Customer Integration APIs
These APIs are designed for developers and integration partners who need to build integrations for a specific customer within their Locate2u account.
- Automatically create and manage stops for a specific customer from an e-commerce platform, CRM, or order management system
- Bulk import customer-specific stops or jobs from external data sources
- Subscribe to customer-scoped webhook events to receive real-time notifications for that customer’s activity only
- Build isolated integrations that connect Locate2u with your existing business systems while keeping customer data separated
Generate Customer-Specific API Keys
Creating API Credentials in the Locate2u App Portal
To access the Customer Integration APIs, you need to generate API credentials (Client ID and Client Secret) from the Locate2u App Portal. Follow these steps:
- Log in to the App Portal:
- Navigate to https://app.locate2u.com and sign in with your Locate2u account.
- Navigate to API Settings:
- Go to your account settings and locate the API or Apps section.
- Select the option to create a new application.
- Create a New Application:
- Provide a name for your application (e.g., “My Integration App”).
- Select the customer account you want to associate with this API access.
- Click Create to generate your credentials.
- Save Your Credentials:
- Your Client ID and Client Secret will be displayed.
- Important: The Client Secret is shown only once. Copy and store it securely immediately.
- If you lose your Client Secret, you will need to regenerate new credentials.
Security Best Practices
- Never share your Client Secret in public repositories, client-side code, or unsecured locations.
- Store credentials in environment variables or a secure secrets manager.
- If you suspect your credentials have been compromised, regenerate them immediately from the App Portal.
- Use HTTPS for all API communications.
Authentication (OAuth 2.0)
Overview
The Customer Integration API uses OAuth 2.0 Authorization Code flow for authentication. All API requests must include a valid access token in the Authorization header.
Base URL: https://integration.locate2u.com
Identity Server: https://id.locate2u.com
OAuth 2.0 Endpoints
| Endpoint | URL |
| Authorization | https://id.locate2u.com/connect/authorize |
| Token | https://id.locate2u.com/connect/token |
Required Parameters
| Parameter | Description |
| client_id | Your application’s Client ID from the App Portal. |
| client_secret | Your application’s Client Secret from the App Portal. |
| grant_type | Use authorization_code for the initial token request. |
| scope | Use integrations-api to access the Customer Integration API. |
| redirect_uri |
The OAuth2 redirect URL. This must be set to
https://integration.locate2u.com/swagger/oauth2-redirect.html.
|
| code | The authorization code received after user authorization. |
Step 1: Authorization Request
Redirect the user to the authorization endpoint to obtain an authorization code:
GET https://id.locate2u.com/connect/authorize?
response_type=code
&client_id=YOUR_CLIENT_ID
&redirect_uri=YOUR_REDIRECT_URI
&scope=integrations-api
&state=YOUR_STATE_VALUE
Step 2: Exchange Authorization Code for Token
After the user authorizes your application, exchange the authorization code for an access token:
curl -X POST https://id.locate2u.com/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "code=AUTHORIZATION_CODE" \
-d "redirect_uri=YOUR_REDIRECT_URI"
Example Token Response
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "integrations-api"
}
Step 3: Call the API with Your Token
Include the access token in the Authorization header for all API requests:
curl -X GET https://integration.locate2u.com/v1/Discovery/User \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Example API Response
{
"userId": 12345,
"email": "[email protected]",
"teamId": 67890,
"teamName": "My Company"
}
Available APIs
The Customer Integration API provides the following endpoint groups. Click on each API group to view detailed documentation for all available endpoints.
| API Group | Description |
| Discovery API | Retrieve information about the authenticated user and their team. |
| Stops API | Create individual stops, bulk import stops, and retrieve stop details. |
| Webhooks API | Subscribe to webhook events, manage subscriptions, and list available event types. |
Discovery API Endpoints
| Method | Endpoint | Description |
| GET | /v1/Discovery/User | Retrieve information about the currently authenticated user. |
Stops API Endpoints
| Method | Endpoint | Description |
| GET | /v1/Stops/{id} | Retrieve details of a specific stop by its ID. |
| POST | /v1/Stops | Create a new stop with the provided details. |
| POST | /v1/Stops/import | Bulk import multiple stops in a single request. |
Webhooks API Endpoints
| Method | Endpoint | Description |
| GET | /v1/Webhooks/event-types | List all available webhook event types. |
| GET | /v1/Webhooks | List all your subscribed webhooks. |
| POST | /v1/Webhooks | Subscribe to a webhook event. |
| GET | /v1/Webhooks/{id} | Retrieve details of a specific webhook subscription. |
| PUT | /v1/Webhooks/{id} | Update an existing webhook subscription. |
| DELETE | /v1/Webhooks/{id} | Unsubscribe from a webhook event. |
Interactive API Documentation
For detailed request/response schemas and the ability to test API calls directly, visit the interactive Swagger documentation:
https://integration.locate2u.com/swagger/index.html
Get Started Today
Ready to integrate with Locate2u? Follow these steps to get started:
- Generate API Keys: Log in to the Locate2u App Portal and create your application credentials.
- Authenticate: Use the OAuth 2.0 flow to obtain an access token.
- Explore the APIs: Use the Swagger documentation to explore available endpoints.
- Build Your Integration: Start making API calls to automate your workflows.
If you have questions or need assistance, contact us at [email protected]
