Company API
/company
9 endpoints
Manage company details within organizations
Endpoint Base
https://api.storylinezads.com/companyAll endpoints in this section are relative to this base path. Use this prefix for all requests to the Company API.
Company Details Management
Create, retrieve, update, and manage company details
POST
Create Company Details
/company/createCreate Company Details - POST /company/create
Creates new company details for an organization.
Parameters:
- org_id: The ID of the organization to which the company details belong.
- company_name: The name of the company.
- type: Type of company details. Defaults to an empty string if not provided.
- tag_line: Company tag line or slogan. Defaults to an empty string if not provided.
- cta_text: Call to action text. Defaults to an empty string if not provided.
- cta_subtext: Supplementary call to action text. Defaults to an empty string if not provided.
- link: Related URL. Defaults to an empty string if not provided.
- company_type: Type of company/industry. Defaults to an empty string if not provided.
- vision: Company vision statement. Defaults to an empty string if not provided.
- products: Description of company products. Defaults to an empty string if not provided.
- others: Additional custom fields. Defaults to an empty object if not provided.
- description: General company description. Defaults to an empty string if not provided.
- is_default: Whether this is the default company details for the organization. Defaults to true if this is the first company details for the org, otherwise false.
GET
Get All Company Details
/company/get_allGet All Company Details - GET /company/get_all
Retrieves all company details for a specific organization.
Parameters:
- org_id: The ID of the organization for which to retrieve company details.
- page: Page number for paginated results (starting from 1).
- limit: Number of results to return per page (max 100).
- sort_by: Field to sort results by (e.g., company_name, type, created_at, updated_at, etc).
- order: Sort order, either 'asc' for ascending or 'desc' for descending.
GET
Get One Company Detail
/company/get_oneGet One Company Detail - GET /company/get_one
Retrieves a single company detail by ID or the default one for an organization.
Parameters:
- company_details_id: The ID of the specific company details to retrieve. Required if org_id not provided.
- org_id: The organization ID to get default company details for. Required if company_details_id not provided.
PUT
Update Company Details
/company/updateUpdate Company Details - PUT /company/update
Updates existing company details.
Parameters:
- company_details_id: The ID of the company details to update.
- company_name: Updated name of the company.
- type: Updated type of company details.
- tag_line: Updated company tag line.
- cta_text: Updated call to action text.
- cta_subtext: Updated call to action subtext.
- link: Updated related URL.
- company_type: Updated type of company/industry.
- vision: Updated company vision statement.
- products: Updated description of company products.
- others: Updated additional custom fields.
- description: Updated general company description.
- is_default: Set to true to make this the default company details for the organization.
DELETE
Delete Company Details
/company/deleteDelete Company Details - DELETE /company/delete
Deletes company details by ID.
Parameters:
- company_details_id: The ID of the company details to delete.
PUT
Set Default Company Details
/company/set_defaultSet Default Company Details - PUT /company/set_default
Sets specific company details as the default for an organization.
Parameters:
- company_details_id: The ID of the company details to set as default.
POST
Duplicate Company Details
/company/duplicateDuplicate Company Details - POST /company/duplicate
Creates a copy of existing company details.
Parameters:
- company_details_id: The ID of the company details to duplicate.
- org_id: The organization ID that the company details belong to.
- company_name: Custom name for the duplicated company details. If not provided, '(Copy)' will be appended to the original name.
GET
Search Company Details
/company/searchSearch Company Details - GET /company/search
Searches for company details within an organization based on specific criteria.
Parameters:
- org_id: The ID of the organization for which to search company details.
- q: Search term to match against the specified field.
- field: Field to search in (company_name, type, tag_line, company_type, vision, products, description).
- page: Page number for paginated results (starting from 1).
- limit: Number of results to return per page (max 100).
- sort_by: Field to sort results by (e.g., company_name, type, created_at, updated_at, etc).
- order: Sort order, either 'asc' for ascending or 'desc' for descending.
GET
Get Default Company Details
/company/get_defaultGet Default Company Details - GET /company/get_default
Retrieves the default company details for a specific organization.
Parameters:
- org_id: The ID of the organization for which to retrieve the default company details.