RAAL Customer Portal — External API
Written By Dainius Figoras
Last updated 15 days ago
Public API for external integrations. Authenticate with your API key and employee email address.
Version: v1 Base URL: http://customerportal-api.raal.io/
Authentication
Every request requires both of the following:
Note: several endpoints below also take
Endpoints
Company
GET /external/company/subscription
Get the company's current subscription.
Response 200: SubscriptionResponse
GET /external/company/subscription/preview
Preview the cost impact of a subscription change before committing to it.
Response 200: SubscriptionChangePreviewDto
GET /external/company/settings
PUT /external/company/settings
Update company settings.
Request body: application/json, object (free-form) Response 200: object (free-form)
GET /external/company/ops-policy
Get the company's ops (usage) policy.
Response 200: CompanyOpsPolicyDto
PUT /external/company/ops-policy
Set the company's ops policy.
Request body: application/json, object (free-form) Response 200: CompanyOpsPolicyDto
DELETE /external/company/ops-policy/pending
Cancel a pending ops-policy change.
Response 200: CompanyOpsPolicyDto
GET /external/company/ops
Get the company's current ops balance / usage.
Response 200: OpsResponse
GET /external/company/ops/consumption-rules
List the ops consumption rules that apply to this company.
Response 200: array of OpsConsumptionRuleDto
GET /external/company/employee
Get a single employee by email.
Response 200: CompanyEmployee
PUT /external/company/employee
Update an employee.
Request body: CompanyEmployeeResponse 200: CompanyEmployee
POST /external/company/employee
Add a new employee.
Request body: CompanyUserResponse 200: CompanyEmployee
GET /external/company/employee/all
List all employees for the company.
Response 200: array of CompanyEmployee
DELETE /external/company/employee/{employeeId}
Delete an employee.
Response 200: —
POST /external/company/employee/{employeeId}/deactive
Deactivate an employee.
Response 200: CompanyEmployee
POST /external/company/employee/{employeeId}/reactive
Reactivate a previously deactivated employee.
Response 200: CompanyEmployee
GET /external/company/hr/employees
List employees as sourced from the connected HR system.
Response 200: array of objects (free-form, HR-system-specific)
GET /external/company/billing-portal-link
Get a link to the Stripe billing portal for this company.
Response 200: string (URL)
GET /external/company/billing-information
Get the company's billing information.
Response 200: string
Orders (ext-order-controller)
GET /external/order
List orders for the company.
Response 200: array of Order
POST /external/order
Create a new order.
Request body: CreateOrderRequestResponse 200: Order
GET /external/order/{orderId}
Get a single order by ID.
Response 200: Order
POST /external/order/{orderId}/draft-invoice
Generate a draft invoice for the order.
Response 200: Order
GET /external/order/{orderId}/tax
Get the tax amount for the order.
Response 200: string
GET /external/order/{orderId}/payment
Get the payment status/details for the order.
Response 200: string
GET /external/order/{orderId}/payment-link
Get a payment link (e.g. Stripe checkout) for the order.
Response 200: string (URL)
GET /external/order/{orderId}/changes
Get the change history for the order.
Response 200: array of OrderChange
GET /external/order/{orderId}/attachments
List attachments on the order.
Response 200: array of OrderAttachment
GET /external/order/{orderId}/attachments/{attachmentId}/download
Download a specific attachment.
Response 200: byte string (binary content, base64-encoded in JSON)