For Third Parties¶
Authentication¶
API keys are used to authenticate against the API. The API key must be sent as the x-api-key header in every request.
Example:
curl -H "x-api-key: ABC123" https://customer.lime-crm.com/database/limepkg-billecta-integration/fetch-invoice-pdf/123/
Note: Requests that require authentication may return 404 Not Found instead of 401 Unauthorized to prevent information leakage. All requests are subject to Lime CRM's permission model. If access is denied, 403 Forbidden will be returned.
Available Endpoints¶
Download Invoice PDF¶
Download an invoice document in PDF format from Billecta.
Endpoint: GET /fetch-invoice-pdf/{invoice_id}/
Parameters:
- invoice_id: The Lime invoice object ID
Headers:
- x-api-key: Your API key
Example:
curl -H "x-api-key: ABC123" \
https://customer.lime-crm.com/database/limepkg-billecta-integration/fetch-invoice-pdf/1001/
Response:
- Success (200): PDF file with Content-Type: application/pdf
- Not Found (404): Invoice does not exist or access is denied
- Unauthorized (401): Invalid or missing API key
Create Swish Payment Request¶
Create a Swish payment request in Billecta.
Endpoint: POST /payments/swish/{actionpublicid}
Query Parameters:
- phone: Phone number (max 20 characters, required)
- message: Message to display (max 50 characters, required)
Headers:
- x-api-key: Your API key
Example:
curl -X POST -H "x-api-key: ABC123" \
"https://customer.lime-crm.com/database/limepkg-billecta-integration/payments/swish/action123?phone=46701234567&message=Invoice+123"
Response (201 Created):
{
"requestid": "swish_request_id"
}
Error Response (400):
{
"error": "Error description",
"message": "Detailed message"
}
Get Swish Request Status¶
Get the status of a Swish payment request.
Endpoint: GET /payments/swish/{requestid}
Parameters:
- requestid: The request ID from the create endpoint
Headers:
- x-api-key: Your API key
Example:
curl -H "x-api-key: ABC123" \
https://customer.lime-crm.com/database/limepkg-billecta-integration/payments/swish/swish_request_id
Response (200 OK):
{
"requeststatus": "status_value"
}
Status Codes¶
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | Use the response data |
| 201 | Created | Resource created successfully |
| 400 | Bad Request | Check your request parameters |
| 401 | Unauthorized | Verify your API key |
| 403 | Forbidden | Access denied by permission model |
| 404 | Not Found | Resource not found or access denied |
Support¶
For API key generation and help with integration, contact your Lime CRM consultant or the Lime support team. Refer to the Billecta API Documentation for additional details about Billecta-specific endpoints.