Getting started overview
Integrating with the Rappi API allows businesses to automate interactions with Rappi's delivery and logistics network. This typically involves connecting a merchant's e-commerce platform or internal systems to Rappi's infrastructure for tasks such as creating orders, managing product catalogs, and tracking deliveries. The Rappi API is primarily designed for partners looking to integrate their services with Rappi's on-demand delivery capabilities across Latin America Rappi API introduction.
Before making any API calls, partners generally need to complete a registration process and obtain specific credentials to authenticate their requests. The initial setup focuses on establishing a secure connection and verifying access permissions. Subsequent steps involve configuring webhooks for real-time updates and developing logic to handle various delivery states and order types.
The following table outlines the foundational steps for getting started with Rappi's API:
| Step | What to Do | Where to Do It |
|---|---|---|
| 1. Partner Registration | Complete the Rappi Partner registration process. | Rappi Official Website |
| 2. API Access Request | Request API access and credentials after partner approval. | Rappi Partner Portal (details provided post-registration) |
| 3. Retrieve Credentials | Obtain your Client ID and Client Secret. |
Rappi Partner Portal |
| 4. Read Documentation | Familiarize yourself with the API structure and authentication. | Rappi API documentation |
| 5. Make First Request | Send an authenticated request to a Rappi API endpoint. | Using an HTTP client (e.g., cURL, Postman) |
Create an account and get keys
Access to the Rappi API requires an established partnership with Rappi. The process begins by becoming a Rappi Partner, which typically involves a business agreement. Once the partnership is approved, you will gain access to a dedicated partner portal where you can manage your integration settings and obtain API credentials.
- Become a Rappi Partner: Navigate to the Rappi corporate website and locate the partner or merchant registration section. Complete the application form, providing details about your business and integration needs. This often involves a review process by Rappi's team. Specific requirements and forms may vary based on your region and the nature of your business (e.g., restaurant, grocery, retail).
- Access the Partner Portal: Upon approval of your partnership, Rappi will provide you with access credentials for their partner portal. This portal is your central hub for managing your Rappi integration.
- Generate API Keys: Within the partner portal, locate the section related to API integrations or developer settings. Here, you will typically find options to generate your API credentials, which commonly include a
Client IDand aClient Secret. These keys are essential for authenticating your API requests. Treat yourClient Secretas sensitive information, similar to a password, and store it securely. - Understand Authentication: Rappi's API uses OAuth 2.0 for authentication Rappi API authentication details. After obtaining your
Client IDandClient Secret, your application will need to exchange these for an access token. This token is then used in subsequent API calls to authorize your requests. The specific OAuth flow may vary but commonly involves a client credentials grant for server-to-server integrations. For a general understanding of OAuth 2.0, refer to the OAuth 2.0 specification.
Your first request
After acquiring your Client ID and Client Secret, the next step is to obtain an access token and make your first authenticated API call. This example demonstrates how to retrieve an access token and then use it to make a simple request, such as fetching your store's information or a list of available services, if such an endpoint is publicly documented for initial access. Always consult the Rappi API reference documentation for the most accurate and up-to-date endpoints and request formats.
Step 1: Get an Access Token
You will need to make a POST request to Rappi's authentication endpoint, typically referred to as a token endpoint, using your Client ID and Client Secret. The exact URL for the token endpoint should be specified in your partner documentation.
curl -X POST "https://api.rappi.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"
Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your actual credentials. The response will contain an access_token and its expiration time (expires_in).
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}
Step 2: Make an Authenticated API Call
Once you have the access_token, include it in the Authorization header of your subsequent API requests as a Bearer token. This example assumes an endpoint for fetching basic store information exists (replace /v1/stores/me with an appropriate endpoint from the Rappi docs).
curl -X GET "https://api.rappi.com/v1/stores/me" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
This request should return information related to your partner account or associated stores, confirming your successful authentication and API access.
Common next steps
After successfully making your first authenticated request, consider these common next steps to deepen your integration with Rappi:
- Explore Core API Endpoints: Dive into the Rappi API documentation to understand the full range of available endpoints. Key areas often include order creation and management, catalog synchronization, delivery status updates, and potentially financial reporting.
- Implement Webhooks: Configure webhooks to receive real-time notifications about important events, such as new orders, order status changes, or delivery updates. This reduces the need for constant polling and ensures your system stays synchronized with Rappi's operations. Refer to Rappi's documentation for webhook setup and security best practices, which often involve signature verification to ensure the authenticity of incoming requests, as detailed in general webhook security guidelines from providers like Cloudflare's webhook security guide.
- Error Handling and Retry Logic: Implement robust error handling in your application to gracefully manage API failures, network issues, and rate limits. Understand Rappi's API error codes and implement appropriate retry mechanisms, often using exponential backoff strategies.
- Sandbox Environment Testing: Utilize Rappi's sandbox or staging environment (if available) for thorough testing of your integration before deploying to production. This allows you to simulate various scenarios without affecting live operations.
- Data Synchronization: For catalog integrations, develop a strategy for keeping your product data synchronized with Rappi's platform, including inventory levels, pricing, and product descriptions. This may involve periodic updates or event-driven synchronization.
- Monitor API Usage: Keep track of your API call volume and performance. Many API providers offer dashboards in their partner portals to monitor usage, which can help identify potential issues or optimize your integration.
Troubleshooting the first call
Encountering issues during your initial API calls is common. Here's a guide to troubleshooting typical problems:
- 401 Unauthorized:
- Invalid Access Token: Ensure the
access_tokenin yourAuthorizationheader is correct and has not expired. Access tokens typically have a limited lifespan (e.g., 1 hour). If expired, generate a new one. - Missing Token: Verify that the
Authorization: Bearer YOUR_ACCESS_TOKENheader is present in your request. - Incorrect Client Credentials: Double-check your
Client IDandClient Secretused to obtain the access token. Even a single character error can prevent authentication. - Scopes/Permissions: Confirm that your client application has the necessary permissions (scopes) assigned to access the requested endpoint. Some endpoints require specific authorizations.
- Invalid Access Token: Ensure the
- 403 Forbidden:
- Insufficient Permissions: Even with a valid token, your account or specific keys might not have the necessary permissions for the requested resource or action. Contact Rappi support to verify your assigned partner capabilities.
- IP Whitelisting: Check if Rappi's API requires IP whitelisting. If so, ensure your server's IP address is registered with Rappi.
- 400 Bad Request:
- Malformed Request Body: The JSON or form data sent in your request might be incorrectly formatted or missing required fields. Refer to the specific endpoint documentation for the expected payload structure.
- Incorrect Content-Type Header: Ensure your
Content-Typeheader matches the actual body format (e.g.,application/jsonfor JSON bodies,application/x-www-form-urlencodedfor form data).
- 404 Not Found:
- Incorrect Endpoint URL: Verify the API endpoint URL for typos or incorrect versioning. Compare it precisely with the Rappi documentation.
- Resource Not Exist: The specific resource you're trying to access (e.g., an order ID, a store ID) might not exist or be associated with your account.
- Network Errors (Connection Refused, Timeout):
- Firewall or Proxy Issues: Check your local network settings, firewall, or proxy to ensure they are not blocking outgoing requests to Rappi's API servers.
- API Availability: Occasionally, the API might be experiencing downtime. Check Rappi's status page (if available) or contact their support.