# HTTP Request # Making API Requests --- ## Overview Once you have a valid API token, you can use the Back Office API by submitting HTTP requests. The HTTP method indicates the action to perform and the URI specifies the resource to be accessed. > **URI Format** > > `https://api.lwolf.com/platform/v1/{resourcePath}?{parameters}` --- ## Example: Get Offices To retrieve a listing of offices for a client, using cURL you would issue the following HTTP request: ### Request Example ```bash curl "https://api.lwolf.com/platform/v1/clients/{clientId}/offices" \ -H "Authorization: Bearer {api_token}" \ -H "Content-Type: application/json" ``` > **Required Parameters** > > - Replace `{clientId}` with the actual UUID of the client > - Replace `{api_token}` with your valid OAuth 2.0 access token --- ## Successful Response On success, a JSON structured array is returned: ```json [ { "id": "550e8400-e29b-41d4-a716-446655440000", "version": 1, "createdTimestamp": "2024-01-15T10:30:00Z", "modifiedTimestamp": "2024-01-15T10:30:00Z", "name": "Downtown Office", "number": "001", "licenseNumber": "RE12345", "addressLine1": "123 Main Street", "addressLine2": "Suite 200", "addressCity": "Toronto", "addressProvinceCode": "ON", "addressPostalCode": "M5V3A8", "addressCountryCode": "CA", "clientId": "550e8400-e29b-41d4-a716-446655440000", "brokerageId": "660e8400-e29b-41d4-a716-446655440000", "externalSystems": [ { "id": "770e8400-e29b-41d4-a716-446655440000", "code": "MLS001", "typeCode": "MLS", "name": "MLS System", "number": "12345" } ] } ] ``` --- ## Additional Examples ### JavaScript/Fetch ```javascript const response = await fetch(`https://api.lwolf.com/platform/v1/clients/${clientId}/offices`, { method: 'GET', headers: { 'Authorization': `Bearer ${apiToken}`, 'Content-Type': 'application/json' } }); const offices = await response.json(); ``` ### Python/Requests ```python import requests headers = { 'Authorization': f'Bearer {api_token}', 'Content-Type': 'application/json' } response = requests.get( f'https://api.lwolf.com/platform/v1/clients/{client_id}/offices', headers=headers ) offices = response.json() ``` --- ## Best Practices > **API Usage Tips** > > - Always include the `Content-Type: application/json` header > - Use proper UUID format for `clientId` parameters > - Handle errors gracefully with appropriate status code checks > - Implement retry logic for transient failures (5xx errors) > - Cache responses when appropriate to reduce API calls --- ## Need Help? > **Contact Support** > > Having trouble making requests? Contact our developer support team: > > **[developersupport@lwolf.com](mailto:developersupport@lwolf.com)** ---
**Ready to start building?** *You're all set to interact with our Back Office API!*