openapi: 3.1.0 info: version: 1.0.1 title: Root Applications Data stores API description: Root is an end-to-end digital insurance platform that enables you to launch new products and digital engagement channels fast. termsOfService: https://rootplatform.com/about contact: name: Root support team url: https://rootplatform.com/contact email: support@root.co.za servers: - url: https://sandbox.uk.rootplatform.com/v1/insurance description: United Kingdom multi-tenant - sandbox - url: https://api.uk.rootplatform.com/v1/insurance description: United Kingdom multi-tenant - production - url: https://sandbox.rootplatform.com/v1/insurance description: South Africa multi-tenant - sandbox - url: https://api.rootplatform.com/v1/insurance description: South Africa multi-tenant - production security: - basicAuth: [] tags: - name: Data stores paths: /data-stores: get: operationId: list-data-stores summary: List all data stores tags: - Data stores x-additional-tags: - Stores parameters: - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/page' - name: search in: query description: A search string to filter data stores by name or key. required: false schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-stores' example: - data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices created_at: '2021-01-29T13:12:00.968Z' created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 updated_at: '2021-01-29T13:12:00.968Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 post: operationId: create-data-store summary: Create a data store tags: - Data stores x-additional-tags: - Stores parameters: [] requestBody: content: application/json: schema: type: object required: - key - name - schema properties: key: type: string description: The unique key of the data store. name: type: string description: The name of the data store. description: type: string description: The description of the data store. schema: type: object description: An object for which the the schema for data store entities will be base off of. properties: required: type: array items: type: string description: The keys from the data store properties that are mandatory, when creating data store entities. properties: type: object description: The data to which the data store columns are created from, see [data store](ref:data-store). required: - required - properties example: key: devices name: devices description: Devices data store schema: type: object properties: name: type: string price: type: number required: - name - price example: key: devices name: devices description: Devices data store schema: type: object properties: name: type: string price: type: number required: - name - price responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store' example: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db key: devices schema: async: true type: object properties: name: type: string price: type: number required: - name - price description: Devices data store name: devices created_at: '2021-02-01T06:05:13.678Z' created_by: type: api_key id: 313f7511-c16a-4fdb-ba49-25a80a9b571c owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd updated_at: '2021-02-01T06:05:13.678Z' updated_by: type: api_key id: 313f7511-c16a-4fdb-ba49-25a80a9b571c owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd /data-stores/{data_store_key}/entities: head: operationId: count-data-store-entities summary: Count data store entities tags: - Data stores x-additional-tags: - Entities parameters: - $ref: '#/components/parameters/data_store_key' responses: '200': description: Success headers: X-Total-Count: schema: type: integer description: The total number of data store entities. get: operationId: list-data-store-entities summary: List data store entities tags: - Data stores x-additional-tags: - Entities parameters: - $ref: '#/components/parameters/data_store_key' - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/page' - name: search in: query description: A search string to filter data store entities. required: false schema: type: string responses: '200': description: Success headers: X-Total-Count: schema: type: integer description: The total number of data store entities. content: application/json: schema: $ref: '#/components/schemas/data-store-entities' example: - data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Apple iPhone X price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 post: operationId: create-data-store-entity summary: Create a data store entity tags: - Data stores x-additional-tags: - Entities parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices requestBody: content: application/json: schema: type: object description: A dynamic object containing key-value pairs that match the data store's schema. Each key corresponds to a property defined in the data store schema, and each value must be a string, number, or boolean. additionalProperties: oneOf: - type: string - type: number - type: boolean example: name: Apple iPhone X price: 1000000 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store-entity' example: data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Apple iPhone X price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 /data-stores/{data_store_key}: get: operationId: retrieve-data-store summary: Retrieve a data store tags: - Data stores x-additional-tags: - Stores parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store' example: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db key: devices schema: type: object async: true properties: name: type: string price: type: number required: - name - price description: Devices data store name: devices created_at: '2021-01-29T13:12:00.968Z' created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 updated_at: '2021-01-29T13:12:00.968Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 delete: operationId: archive-data-store summary: Archive a data store tags: - Data stores x-additional-tags: - Stores parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store' example: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: async: true properties: cellphone_name: type: string price: type: number required: - cellphone_name - price description: Devices data store name: devices updated_at: '2021-01-28T06:51:08.370Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd patch: operationId: update-data-store summary: Update a data store tags: - Data stores x-additional-tags: - Stores parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices requestBody: content: application/json: schema: type: object required: - schema properties: schema: type: object description: An object for which the schema for data store entities will be based off of. properties: type: type: string description: The schema type. Must be 'object'. enum: - object required: type: array items: type: string description: The keys from the data store properties that are mandatory, when creating data store entities. properties: type: object description: The data to which the data store columns are created from. Each property value should have a `type` field (string, number, or boolean) and optional `minimum`/`maximum` constraints. required: - required - properties example: schema: type: object properties: cellphone_name: type: string price: type: number required: - cellphone_name - price example: schema: type: object properties: cellphone_name: type: string price: type: number required: - cellphone_name - price responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store' example: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db key: devices schema: async: true properties: cellphone_name: type: string price: type: number required: - cellphone_name - price description: Devices data store name: devices updated_at: '2021-01-28T06:51:08.370Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd /data-stores/{data_store_key}/entities/{data_store_entity_id}: delete: operationId: archive-data-store-entity summary: Archive a data store entity tags: - Data stores x-additional-tags: - Entities parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices - name: data_store_entity_id in: path description: Must be a UUID. The unique identifier of the [data store entity](ref:data-store) required: true schema: type: string example: 424312b7-6d8f-424f-bf3e-af1384444424 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store-entity' example: data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Samsung S20 price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 get: operationId: retrieve-data-store-entity summary: Retrieve a data store entity tags: - Data stores x-additional-tags: - Entities parameters: - name: data_store_key in: path description: 'The unique key of the [data store](ref:data-store). ' required: true schema: type: string example: devices - name: data_store_entity_id in: path description: 'Must be a UUID. The unique identifier of the [data store entity](ref:retrieve-a-data-store-entity). ' required: true schema: type: string example: 424312b7-6d8f-424f-bf3e-af1384444424 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store-entity' example: data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Apple iPhone X price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 patch: operationId: update-data-store-entity summary: Update a data store entity tags: - Data stores x-additional-tags: - Entities parameters: - name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices - name: data_store_entity_id in: path description: Must be a UUID. The unique identifier of the [data store entity](ref:data-store-entity) required: true schema: type: string example: 424312b7-6d8f-424f-bf3e-af1384444424 requestBody: content: application/json: schema: type: object description: A dynamic object containing key-value pairs that match the data store's schema. Each key corresponds to a property defined in the data store schema, and each value must be a string, number, or boolean. additionalProperties: oneOf: - type: string - type: number - type: boolean example: name: Samsung S20 price: 1000000 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/data-store-entity' example: data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Samsung S20 price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 components: schemas: data-store-entities: type: array items: $ref: '#/components/schemas/data-store-entity' data-stores: type: array items: $ref: '#/components/schemas/data-store' data-store-entity: type: object required: - data_store_entity_id - organization_id - data - created_by - created_at - updated_at - updated_by - data_store properties: data_store_entity_id: type: string description: Must be a UUID. The unique identifier of the data store entity. organization_id: type: string description: Must be a UUID. The unique identifier of the organization the data store belongs to. data: type: object description: The data store data. created_by: type: object description: An object indicating the user or API key that created the data store entity. created_at: type: string format: date-time description: The time at which the data entity store entity was created. updated_at: type: string format: date-time description: The time at which the data store entity was last updated. updated_by: type: object description: An object indicating the user or API key that last updated the data store entity. data_store: $ref: '#/components/schemas/data-store' example: data_store_entity_id: 424312b7-6d8f-424f-bf3e-af1384444424 organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db data: name: Apple iPhone X price: 1000000 created_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 created_at: '2021-01-28T10:00:24.809Z' updated_at: '2021-01-28T10:00:24.809Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data_store: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f key: devices schema: type: object async: true required: - name - price properties: name: type: string price: type: number description: Devices data store name: devices updated_at: '2021-01-28T10:00:17.773Z' updated_by: type: api_key id: 420df14d-b09d-4d89-84a8-8e3118c9ca23 owner_id: 00000000-0000-0000-0000-000000000001 data-store: type: object required: - data_store_id - key - name - created_at - created_by - updated_at - updated_by - schema properties: data_store_id: type: string description: Must be a UUID. The unique identifier of the data store. organization_id: type: string description: Must be a UUID. The unique identifier of the organization the data store belongs to. key: type: string description: The unique key of the data store. name: type: string description: The name of the data store. description: type: string description: The description of the data store. created_at: type: string format: date-time description: The time at which the data store was created. created_by: type: object description: An object indicating the user or API key that created the data store. See [Authentication](#client-apps). updated_at: type: string format: date-time description: The time at which the data store was last updated. updated_by: type: object description: An object indicating the user or API key that last updated the data store. See [Authentication](#client-apps). schema: type: object description: An object for which the the schema for data store entities will be base off of. properties: required: type: array items: type: string description: The keys from the data store properties that are mandatory, when creating data store entities. properties: type: object description: The data to which the data store columns are created from. See below for more details. required: - required - properties example: data_store_id: 6e91fe74-aa56-4b4e-8f68-636d23d5706f organization_id: 952bfef5-7517-47ff-bf41-08c5a66c52db key: devices name: Devices description: Devices data store schema: async: true type: object properties: name: type: string price: type: number required: - name - price created_by: type: api_key id: 313f7511-c16a-4fdb-ba49-25a80a9b571c owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd created_at: '2021-01-29T13:12:00.968Z' updated_by: type: api_key id: 313f7511-c16a-4fdb-ba49-25a80a9b571c owner_id: da20903b-7f0d-4318-96bd-6df78514e2fd updated_at: '2021-01-29T13:12:00.968Z' parameters: page: name: page in: query description: The page number of the entities to fetch. Must be a minimum of 1. required: false schema: type: integer minimum: 1 example: 1 default: 1 page_size: name: page_size in: query description: The maximum number of items that will be contained in a single page, between 1 and 100 (inclusive). required: false schema: type: integer minimum: 1 maximum: 100 example: 30 default: 30 data_store_key: name: data_store_key in: path description: The unique key of the [data store](ref:data-store) required: true schema: type: string example: devices securitySchemes: basicAuth: type: http scheme: basic x-readme: explorer-enabled: true proxy-enabled: true samples-enabled: true