> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/service/create-new-service-insurance-company.md).

# Create new service insurance company

Create an insurance company entry: the insurer's name and the customer record that stands for it. Supply insuranceCompanyUid to make the call idempotent: a repeat with the same insuranceCompanyUid returns the entry already created and writes nothing — any insuranceCompanyUid the tenant already holds for an insurance company returns that entry — while a malformed uid stays refused. A repeat is answered before any other check the create makes, so it never meets the refusal its own record would cause. The name must not be blank and is unique within the tenant, compared exactly as sent. customerUid must be one of the tenant's customers, and a customer record is linked by at most one entry; a name or a customer another entry already holds is refused.

Required permissions: SERVICE\_CONFIG

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Service","description":"Service"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"InsuranceCompanyResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCompanyResponseSchema"}}}}},"schemas":{"InsuranceCompanyResponseSchema":{"title":"InsuranceCompanyResponseSchema","description":"An insurance company entry: one of the insurers the tenant's service orders name, linked to the customer record that stands for it. The tenant's entries are the intake wizard's insurer picker — picking one puts its customerUid on the service order as insuranceCompanyCustomerUid, so no service order references the entry itself and it is deletable at any time.\nThe entry goes with its customer record: deleting the record deletes the entry, and merging the record into another customer moves the entry to that customer. customerName is the linked customer's display name as it reads now.\nA deprecated entry stays in the list but is not offered in the picker.","type":"object","required":["insuranceCompanyUid","tenantUid","name","customerUid","customerName","deprecated","createdAt","createdBy","lastModifiedAt","lastModifiedBy"],"properties":{"insuranceCompanyUid":{"$ref":"#/components/schemas/UID"},"tenantUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string","description":"What the insurer is called, as it is shown in the picker. Unique within the tenant."},"customerUid":{"description":"The customer record that stands for the insurer. Linked by this entry alone.","type":"string","pattern":"^[A-Za-z0-9-_]+"},"customerName":{"type":"string","description":"The linked customer's display name as it reads now."},"deprecated":{"type":"boolean","description":"A deprecated entry stays in the list but is not offered in the picker."},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InsuranceCompanyCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/InsuranceCompanyUpdateRequestSchema"},{"required":["name","customerUid"],"properties":{"insuranceCompanyUid":{"$ref":"#/components/schemas/UID"}}}],"title":"InsuranceCompanyCreateRequestSchema","description":"A new insurance company entry: the insurer's name and the customer record that stands for it. Supply insuranceCompanyUid to make the call idempotent: a repeat with the same insuranceCompanyUid returns the entry already created and writes nothing — any insuranceCompanyUid the tenant already holds for an insurance company returns that entry — while a malformed uid stays refused. A repeat is answered before any other check the create makes, so it never meets the refusal its own record would cause. Left out, deprecated is false.","type":"object"},"InsuranceCompanyUpdateRequestSchema":{"title":"InsuranceCompanyUpdateRequestSchema","description":"The editable parts of an insurance company entry. A field that is left out keeps its stored value; a field that is sent replaces it.\nThe name must not be blank and is unique within the tenant, compared exactly as sent. customerUid must be one of the tenant's customers, and a customer record is linked by at most one entry; a name or a customer another entry already holds is refused. Set deprecated to take the insurer out of the picker while the entry stays in the list.","type":"object","properties":{"name":{"type":"string","description":"What the insurer is called, as it is shown in the picker."},"customerUid":{"description":"The customer record that stands for the insurer.","type":"string","pattern":"^[A-Za-z0-9-_]+"},"deprecated":{"type":"boolean","description":"A deprecated entry stays in the list but is not offered in the picker."}}}},"requestBodies":{"InsuranceCompanyCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCompanyCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/serviceorders/insurancecompanies":{"post":{"summary":"Create new service insurance company","operationId":"post-serviceorders-insurancecompanies","description":"Create an insurance company entry: the insurer's name and the customer record that stands for it. Supply insuranceCompanyUid to make the call idempotent: a repeat with the same insuranceCompanyUid returns the entry already created and writes nothing — any insuranceCompanyUid the tenant already holds for an insurance company returns that entry — while a malformed uid stays refused. A repeat is answered before any other check the create makes, so it never meets the refusal its own record would cause.\nThe name must not be blank and is unique within the tenant, compared exactly as sent. customerUid must be one of the tenant's customers, and a customer record is linked by at most one entry; a name or a customer another entry already holds is refused.\n\nRequired permissions: SERVICE_CONFIG","responses":{"201":{"$ref":"#/components/responses/InsuranceCompanyResponse"}},"tags":["Service"],"requestBody":{"$ref":"#/components/requestBodies/InsuranceCompanyCreateRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/service/create-new-service-insurance-company.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
