CreateClients
This method creates a client record.
Supplementary SWAGGER documentation is available here: https://api.catch-e.com/docs/#/Clients/createClient
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Clients:Create.
Note: This API is not configured for external use. Contact your Account Manager to discuss access to this API.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.catch-e.com/fm/clients
Headers
Body (JSON)
Input Fields (JSON)
{ "client_code": "TEST001", "user_id": "10842", "user_id_sales": "10842", "name": "Test Client", "client_type": "fleet", "address1": "123 Business Street", "address2": "Suite 100", "area": "Keysborough", "state": "VIC", "pcode": "3173", "phone": "03 9999 9999", "abn": "12 345 678 901", "acn": "345 678 901", "contact1_name": "John Smith", "contact1_email": "john@example.com", "contact1_phone": "03 9999 9999", "billing_interval": "monthly", "report_delivery_type": "email", "payment_method": "eft", "allow_quoting_flag": "yes" } Response Details
Successful Response Example
The response returns all client fields including client defaults and client packaging defaults. A successful response includes the newly created client(s) with generated client_id and comprehensive nested structures:
{ "_links": { "self": { "href": "https://api.test.catch-e.com/fm/clients" } }, "_embedded": { "fm_clients": [ { "bespoke_field_values": [], "inclusion_client_exclusions": [], "client_defaults": { "client_default_id": "100547", "client_id": "100547", "client_group_flag": "no", "relief_vehicle_flag": "yes", "delivery_fee_funded_flag": "no", "fuel_on_delivery_funded_flag": "no", "supplier_id_financier": null, "policy_owner_type": "driver", "supplier_id_insurer": null, "residual_margin_rate": 0, "residual_margin_rate_commercial": 0, "excess_km_rate": 0, "establishment_fee": 0, "management_fee": 0, "maintenance_program_fee": 0, "novated_commission_rate": 0, "insurance_broker_fee_exempt_flag": "yes", "carbon_emission_offset_flag": "yes", "roadside_assistance_plan_code": "", "accident_management_fee": 0 }, "client_id": "100547", "client_id_external": "0", "client_code": "Test002", "client_id_parent": "0", "name": "Test Client", "channel_id": "0", "client_type": "fleet", "client_industry_id": "0", "client_credit_ratings_id": null, "sic_code": "", "financial_year_end": "June", "company_tax_rate": 0, "user_id": "11244", "user_id_sales": "11244", "address1": "123 Business Street", "address2": "Suite 100", "area": "Keysborough", "state": "VIC", "pcode": "3173", "country_id": null, "phone": "03 9999 9999", "mobile": null, "fax": null, "abn": "12 345 678 901", "acn": "345 678 901", "arbn": null, "corporate_type_id": "0", "business_start_date": "0000-00-00", "contact1_name": "John Smith", "contact1_job_title": "", "contact1_phone": "03 9999 9999", "contact1_email": "john@example.com", "contact1_note": null, "billing_interval": "monthly", "report_delivery_type": "email", "payment_method": "eft", "allow_quoting_flag": "yes", "dirty_flag": "2024-07-01 02:45:50", "_embedded": { "client_packaging_defaults": { "aba_description": "", "aba_self_balancing_flag": "yes", "apca_number": "", "bank_account_enabled_flag": "yes", "bank_account_name": "", "bank_account_name_short": "", "bank_account_number": null, "bank_bsb": null, "client_id": "100547", "client_packaging_default_id": "14728602546281119856", "financial_institution_id": null, "pay_run_processing_state": null, "pay_run_start": 0, "pay_run_start2": 0, "pay_run_start3": 0, "pay_run_weekend_treatment": null, "payroll_fbt": null, "payroll_gst": null, "payroll_itc": null, "payroll_lcc": null, "payroll_post_tax": null, "payroll_pre_tax": null, "report_delivery_type": "email", "report_groups": [], "taxable_sales": "all-items", "_links": { "self": { "href": "https://api.test.catch-e.com/sp/client/packaging-defaults/100547" } } } }, "_links": { "self": { "href": "https://api.test.catch-e.com/fm/clients/100547" } } } ] }, "total_items": 1 } Creating Multiple Clients
To create multiple Client records you can include multiple datasets in a single request. An example is shown here (displaying only minimum fields in this example):
[ { "client_code": "CLIENTONE", "user_id": "10842", "user_id_sales": "10842" }, { "client_code": "CLIENTTWO", "user_id": "10842", "user_id_sales": "10842" } ] The response will return all created clients with their newly generated client_id values and all associated client defaults and packaging defaults records.