Billings
This section describes the API endpoints for managing billings.
Fetch Invoices
GET /v1/service/billings
Description: Creates a new mandate.
Request Body:
{
"company_name": "Example Company",
"company_logo": "https://example.com/logo.png",
"user_id": "userId123",
"title": "Customer Support",
"company_symbol": "EX"
}'Parameters:
company_name(string, required): The name of the mandate.user_id(string, required): The user Id of the mandate.company_logo(string): The name of the mandate.company_symbol(string): The company symbol.title(array): Company title.
Response:
{
id: "string",
name: "string",
participants: [
"string"
],
createdAt: "string",
updatedAt: "string"
}Response Parameters:
id(string): The ID of the created mandate.name(string): The name of the mandate.participants(array): An array of user IDs participating in the mandate.createdAt(string): The timestamp of when the mandate was created.updatedAt(string): The timestamp of when the mandate was last updated.
Sample Code - CURL
curl -X POST --location 'http://api.mobid.io/v1/service/billings' \
--header 'Accept: application/json' \
--header 'X-Mobid-Key: <YOUR_API_KEY> \
--header 'Content-Type: application/json' \
--data '{"company_name": "Example Company",
"company_logo": "https://example.com/logo.png",
"user_id": "userId123",
"title": "Customer Support",
"company_symbol": "EX"}'Get mandate
GET /v1/service/billings/{mandateId}
Description: Retrieves a mandate by ID.
Parameters:
mandateId(string, path, required): The ID of the mandate to retrieve.
Response:
{
id: "string",
name: "string",
participants: [
"string"
],
createdAt: "string",
updatedAt: "string"
}Response Parameters:
id(string): The ID of the mandate.name(string): The name of the mandate.participants(array): An array of user IDs participating in the mandate.createdAt(string): The timestamp of when the mandate was created.updatedAt(string): The timestamp of when the mandate was last updated.
Update mandate
PUT /v1/service/billings/{mandateId}
Description: Updates a mandate by ID.
Parameters:
mandateId(string, path, required): The ID of the mandate to update. Request Body:
{
name: "string",
participants: [
"string"
]
}Parameters:
name(string, optional): The new name of the mandate.participants(array, optional): An array of user IDs participating in the mandate.
Response:
{
id: "string",
name: "string",
participants: [
"string"
],
createdAt: "string",
updatedAt: "string"
}Response Parameters:
id(string): The ID of the mandate.name(string): The name of the mandate.participants(array): An array of user IDs participating in the mandate.createdAt(string): The timestamp of when the mandate was created.updatedAt(string): The timestamp of when the mandate was last updated.
Delete mandate
DELETE /v1/service/billings/{mandateId}
Description: Deletes a mandate by ID.
Parameters:
mandateId(string, path, required): The ID of the mandate to delete.
Response:
{
message: "string"
}Response Parameters:
message (string): A message indicating the success of the deletion.
List billings
GET /v1/service/billings
Description: Retrieves a list of billings.
Parameters:
page(integer, query, optional): The page number of the results to return.pageSize(integer, query, optional): The number of results to return per page.
Response:
[
{
id: "string",
name: "string",
participants: [
"string"
],
createdAt: "string",
updatedAt: "string"
}
]Response Object:
id(string): The ID of the mandate.name(string): The name of the mandate.participants(array): An array of user IDs participating in the mandate.createdAt(string): The timestamp of when the mandate was created.updatedAt(string): The timestamp of when the mandate was last updated.
GET /v1/companies/{symbol}/prompts
Description: Fetches popular prompts for the specified company symbol.
Parameters:
symbol(in query): The symbol of the company (e.g., AAPL for Apple, GOOGL for Google)
Example : AAPL
Response:
{
success: true,
data: [
{
prompt: "What are Apple's revenue streams?",
usage_count: 128
}
]
}Response Object:
id(string): The ID of the mandate.name(string): The name of the mandate.
GET /v1/companies/{symbol}/questions
Description: Fetches popular prompts for the specified company symbol.
Parameters:
symbol(in query): The symbol of the company (e.g., AAPL for Apple, GOOGL for Google)
Example : AAPL
Response:
{
success: true,
data: [
{
"prompt": "What are Apple's revenue streams?",
"usage_count": 128
}
]
}Response Object:
id(string): The ID of the mandate.name(string): The name of the mandate.