{
    "openapi": "3.0.0",
    "info": {
        "title": "Cordial Ingress Ingest API",
        "contact": {
            "name": "Cordial",
            "email": "support@cordial.com"
        },
        "version": "1.0"
    },
    "servers": [
        {
            "url": "/api"
        }
    ],
    "paths": {
        "/upsertContact": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertContact",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestUpsertContact"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/upsertContact/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertContact/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchUpsertContact"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/createContactactivities": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/createContactactivities",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestCreateContactactivities"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/createContactactivities/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/createContactactivities/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchCreateContactactivities"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/addContactsToList": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/addContactsToList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestAddContactsToList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/addContactsToList/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/addContactsToList/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchAddContactsToList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/removeContactsFromList": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/removeContactsFromList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestRemoveContactsFromList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/removeContactsFromList/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/removeContactsFromList/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchRemoveContactsFromList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/addProductsToCart": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/addProductsToCart",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestAddProductsToCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/addProductsToCart/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/addProductsToCart/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchAddProductsToCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/removeProductsFromCart": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/removeProductsFromCart",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestRemoveProductsFromCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/removeProductsFromCart/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/removeProductsFromCart/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchRemoveProductsFromCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/upsertSupplementsRecords": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertSupplementsRecords",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestUpsertSupplementsRecords"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/upsertSupplementsRecords/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertSupplementsRecords/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchUpsertSupplementsRecords"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/upsertOrder": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertOrder",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestUpsertOrder"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/upsertOrder/batch": {
            "post": {
                "tags": [
                    "Ingest Async API"
                ],
                "operationId": "/upsertOrder/batch",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/IngestBatchUpsertOrder"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/amplitude/addContactsToList": {
            "post": {
                "tags": [
                    "Amplitude"
                ],
                "operationId": "/amplitude/addContactsToList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AmplitudeAddContactsToList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "400": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    },
                    "401": {
                        "description": "Authentication error."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/amplitude/removeContactsFromList": {
            "post": {
                "tags": [
                    "Amplitude"
                ],
                "operationId": "/amplitude/removeContactsFromList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AmplitudeRemoveContactsFromList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "400": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    },
                    "401": {
                        "description": "Authentication error."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/heap/listMembership/{accountId}": {
            "post": {
                "tags": [
                    "Heap"
                ],
                "operationId": "/heap/listMembership",
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "Heap-Hash",
                        "in": "header",
                        "description": "Heap signature for verifying data. Will have a timstamp `ts` and signature `hmac`",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "ts:150000000,hmac:XXXXXXXXX"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/HeapWebhookSyncRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "406": {
                        "description": "Only JSON requests are allowed."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                }
            }
        },
        "/mparticle/moduleRegistration": {
            "post": {
                "tags": [
                    "mParticle"
                ],
                "operationId": "/mparticle/moduleRegistration",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MparticleModuleRegistration"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    }
                }
            }
        },
        "/mparticle/eventProcessing": {
            "post": {
                "tags": [
                    "mParticle"
                ],
                "operationId": "/mparticle/eventProcessing",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MparticleEventProcessing"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Authentication error"
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied"
                    }
                }
            }
        },
        "/mparticle/audienceMembershipChange": {
            "post": {
                "tags": [
                    "mParticle"
                ],
                "operationId": "/mparticle/audienceMembershipChange",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MparticleAudienceMembershipChange"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Authentication error"
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied"
                    }
                }
            }
        },
        "/mparticle/audienceSubscription": {
            "post": {
                "tags": [
                    "mParticle"
                ],
                "operationId": "/mparticle/audienceSubscription",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MparticleAudienceSubscription"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Authentication error"
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied"
                    }
                }
            }
        },
        "/recharge/subscription/{accountId}": {
            "post": {
                "tags": [
                    "Recharge"
                ],
                "operationId": "/recharge/subscription",
                "parameters": [
                    {
                        "name": "accountId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "name": "X-Recharge-Hmac-Sha256",
                        "in": "header",
                        "description": "Hash generated using the API Client Secret, along with the data sent in the request hash('sha256', $clientSecret . $requestBody)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Subscription"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                }
            }
        },
        "/segment/createContactactivity": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/createContactactivity",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentCreateContactactivity"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/upsertContact": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/upsertContact",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentUpsertContact"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/addContactToList": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/addContactToList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentAddContactToList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/removeContactFromList": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/removeContactFromList",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentRemoveContactFromList"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/addProductToCart": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/addProductToCart",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentAddProductToCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/removeProductFromCart": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/removeProductFromCart",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentRemoveProductFromCart"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/upsertOrder": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/upsertOrder",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentUpsertOrder"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        },
        "/segment/mergeContacts": {
            "post": {
                "tags": [
                    "Segment"
                ],
                "operationId": "/segment/mergeContacts",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SegmentMergeContacts"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Accepted"
                    },
                    "401": {
                        "description": "Authentication error."
                    },
                    "422": {
                        "description": "Validation error: Bad request. When required parameters were not supplied."
                    }
                },
                "security": [
                    {
                        "cordial_api_key": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Attributes": {
                "title": "Attributes",
                "description": "At least one attribute should be present",
                "properties": {
                    "attributeKey": {
                        "type": "string"
                    },
                    "channels": {
                        "description": "Channels object, should not be empty if provided",
                        "properties": {
                            "email": {
                                "description": "Email channel object, should not be empty if provided",
                                "properties": {
                                    "address": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "subscribeStatus": {
                                        "type": "enum",
                                        "enum": [
                                            "subscribed",
                                            "unsubscribed",
                                            "none"
                                        ]
                                    },
                                    "subscribedAt": {
                                        "description": "Valid date or timestamp"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object",
                "example": {
                    "attributeKey": "value",
                    "channels": {
                        "email": {
                            "address": "test",
                            "subscribeStatus": "subscribed"
                        }
                    }
                }
            },
            "BaseCartItem": {
                "title": "BaseCartItem",
                "required": [
                    "productID",
                    "qty"
                ],
                "properties": {
                    "productID": {
                        "type": "string",
                        "example": "507f1f77bcf86cd799439011"
                    },
                    "qty": {
                        "type": "integer",
                        "example": 5
                    }
                },
                "type": "object"
            },
            "BaseCartItemForRemotion": {
                "title": "BaseCartItemForRemotion",
                "required": [
                    "productID",
                    "qty"
                ],
                "properties": {
                    "productID": {
                        "type": "string",
                        "example": "507f1f77bcf86cd799439011"
                    },
                    "qty": {
                        "type": "integer",
                        "example": 5
                    },
                    "sku": {
                        "type": "string",
                        "example": "some-sku",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "Contact": {
                "title": "Contact",
                "required": [
                    "identifiers"
                ],
                "type": "object",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    },
                    {
                        "properties": {
                            "attributes": {
                                "$ref": "#/components/schemas/Attributes"
                            },
                            "forceSubscribe": {
                                "description": "If contact may be force subscribed",
                                "type": "boolean",
                                "example": false
                            },
                            "mergeOptions": {
                                "$ref": "#/components/schemas/ContactMergeOptions"
                            },
                            "restrictedUpdateAttrKeys": {
                                "description": "List of attributes that may not be updated if value is already set",
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "example": [
                                    "cid",
                                    "email"
                                ]
                            },
                            "canBeCreated": {
                                "description": "If contact may be created if not exists.\n                            If set to true, attributes field is required.",
                                "type": "boolean",
                                "example": false
                            },
                            "canBeUpdated": {
                                "description": "If contact attributes may be updated for existing contacts.\n                            If set to true, attributes field is required.",
                                "type": "boolean",
                                "example": false
                            }
                        },
                        "type": "object"
                    },
                    {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    }
                ]
            },
            "ContactIdentifiers": {
                "title": "ContactIdentifiers",
                "description": "Contact identifiers collection",
                "required": [
                    "identifiers"
                ],
                "properties": {
                    "identifiers": {
                        "description": "Identifiers value should be non-empty string or integer",
                        "type": "object",
                        "example": {
                            "cID": "60a2a151c60e523d3b632677",
                            "email": "test@example.com",
                            "channels.sms.address": "+12124567890",
                            "custId": "someid"
                        }
                    },
                    "identifiersPriority": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "cID",
                            "email",
                            "channels.sms.address",
                            "custId",
                            "anotherId"
                        ]
                    }
                },
                "type": "object"
            },
            "ContactMergeOptions": {
                "title": "ContactMergeOptions",
                "properties": {
                    "mergeAllowed": {
                        "description": "Should we try to merge contacts in case of a conflict?",
                        "type": "boolean",
                        "example": false
                    },
                    "mergeableSecondaryKeys": {
                        "description": "By default, we do not allow merging of contacts if it'll result an overwrite of the primary/secondary key\n * (e.g. contact1['email' => 'test1@example.com'], contact2['email' => 'test2@example.com'] won't be merged if 'email' is a primary/secondary key,\n * but contact1['email' => 'test@example.com', 'sms' => '+123456789'], contact2['email' => 'test@example.com', 'customID' => 'someId'] would be merged succesfully).\n * Here you may override this behavior for selected keys.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "email",
                            "phone"
                        ]
                    }
                },
                "type": "object"
            },
            "ContactsIdentifiers": {
                "title": "ContactsIdentifiers",
                "description": "Contacts identifiers collection",
                "required": [
                    "identifiers"
                ],
                "properties": {
                    "identifiers": {
                        "description": "Identifiers value should be non-empty string or integer",
                        "type": "array",
                        "items": {
                            "type": "object"
                        },
                        "example": [
                            {
                                "channels.email.address": "email"
                            },
                            {
                                "sms": "123456789"
                            }
                        ]
                    },
                    "identifiersPriority": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "sms",
                            "channels.email.address"
                        ]
                    }
                },
                "type": "object"
            },
            "Device": {
                "title": "Device",
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/DeviceType"
                    },
                    "device": {
                        "type": "string",
                        "example": "iPhone 11"
                    },
                    "platform": {
                        "type": "string",
                        "example": "iPhone OS"
                    },
                    "browser": {
                        "type": "string",
                        "example": "Safari"
                    },
                    "ip": {
                        "type": "string",
                        "example": "127.0.0.1"
                    },
                    "robot": {
                        "type": "boolean",
                        "example": false
                    }
                },
                "type": "object"
            },
            "DeviceType": {
                "title": "DeviceType",
                "type": "string",
                "enum": [
                    "Computer",
                    "Tablet",
                    "Mobile"
                ],
                "example": "mobile"
            },
            "DiscountApplication": {
                "title": "DiscountApplication",
                "description": "Discount application data",
                "required": [
                    "type",
                    "amount"
                ],
                "properties": {
                    "type": {
                        "description": "Type of discount",
                        "type": "enum",
                        "enum": [
                            "fixed"
                        ]
                    },
                    "amount": {
                        "type": "decimal",
                        "example": 10.4
                    }
                },
                "type": "object"
            },
            "Event": {
                "title": "Event",
                "required": [
                    "name",
                    "time"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "time": {
                        "type": "string"
                    },
                    "UID": {
                        "type": "string"
                    },
                    "geo": {
                        "$ref": "#/components/schemas/Geo"
                    },
                    "device": {
                        "$ref": "#/components/schemas/Device"
                    },
                    "properties": {
                        "type": "object",
                        "example": {
                            "foo": "bar"
                        }
                    }
                },
                "type": "object"
            },
            "ExtendedCartItem": {
                "title": "ExtendedCartItem",
                "required": [
                    "productID",
                    "qty",
                    "sku",
                    "category",
                    "name"
                ],
                "type": "object",
                "allOf": [
                    {
                        "$ref": "#/components/schemas/BaseCartItem"
                    },
                    {
                        "properties": {
                            "sku": {
                                "type": "string",
                                "example": "AFP-123"
                            },
                            "category": {
                                "type": "string",
                                "example": "Home decor"
                            },
                            "name": {
                                "type": "string",
                                "example": "Lava lamp"
                            },
                            "description": {
                                "type": "string",
                                "example": "Beatiful lava lamp for your home"
                            },
                            "itemPrice": {
                                "type": "decimal",
                                "example": 9.79
                            },
                            "url": {
                                "type": "string",
                                "example": "https://cordial.com/beatiful-lava-lamp"
                            },
                            "images": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "example": [
                                    "https://cordial.com/beatiful-lava-lamp.jpg",
                                    "https://cordial.com/beatiful-lava-lamp-2.jpg"
                                ]
                            },
                            "properties": {
                                "type": "object",
                                "example": {
                                    "color": "black",
                                    "size": "large"
                                }
                            },
                            "attr": {
                                "type": "object",
                                "example": {
                                    "taxable": true
                                }
                            }
                        },
                        "type": "object"
                    },
                    {
                        "$ref": "#/components/schemas/BaseCartItem"
                    }
                ]
            },
            "Geo": {
                "title": "Geo",
                "properties": {
                    "city": {
                        "type": "string",
                        "example": "Washington"
                    },
                    "country": {
                        "type": "string",
                        "example": "US"
                    },
                    "geoLoc": {
                        "$ref": "#/components/schemas/GeoLoc"
                    }
                },
                "type": "object"
            },
            "GeoLoc": {
                "title": "GeoLoc",
                "properties": {
                    "lat": {
                        "type": "number",
                        "format": "float",
                        "example": 40.2964197
                    },
                    "lon": {
                        "type": "number",
                        "format": "float",
                        "example": -76.9411617
                    }
                },
                "type": "object"
            },
            "OrderItem": {
                "title": "OrderItem",
                "required": [
                    "productID",
                    "sku",
                    "name"
                ],
                "properties": {
                    "productID": {
                        "type": "string",
                        "example": "507f1f77bcf86cd799439011"
                    },
                    "sku": {
                        "type": "string",
                        "example": "AFP-123"
                    },
                    "name": {
                        "type": "string",
                        "example": "Lava lamp"
                    },
                    "manufacturerName": {
                        "type": "string",
                        "example": "Cordial"
                    },
                    "category": {
                        "type": "string",
                        "example": "Home decor"
                    },
                    "itemPrice": {
                        "type": "decimal",
                        "example": 9.79
                    },
                    "qty": {
                        "type": "integer",
                        "example": 5
                    },
                    "url": {
                        "type": "string",
                        "example": "https://cordial.com/beatiful-lava-lamp"
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "https://cordial.com/beatiful-lava-lamp.jpg",
                            "https://cordial.com/beatiful-lava-lamp-2.jpg"
                        ]
                    },
                    "properties": {
                        "type": "object",
                        "example": {
                            "color": "black",
                            "size": "large"
                        }
                    },
                    "attr": {
                        "type": "object",
                        "example": {
                            "taxable": true
                        }
                    }
                },
                "type": "object"
            },
            "AmplitudeAddContactsToList": {
                "title": "AmplitudeAddContactsToList",
                "required": [
                    "contacts",
                    "cohortId",
                    "cohortName"
                ],
                "properties": {
                    "contacts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "example": {
                                "email": "test@example.com"
                            }
                        }
                    },
                    "cohortId": {
                        "type": "string",
                        "example": "h51r"
                    },
                    "cohortName": {
                        "type": "string",
                        "example": "Cohort Test"
                    }
                },
                "type": "object"
            },
            "AmplitudeRemoveContactsFromList": {
                "title": "AmplitudeRemoveContactsFromList",
                "required": [
                    "contacts",
                    "cohortId",
                    "cohortName"
                ],
                "properties": {
                    "contacts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "example": {
                                "email": "test@example.com"
                            }
                        }
                    },
                    "cohortId": {
                        "type": "string",
                        "example": "h51r"
                    },
                    "cohortName": {
                        "type": "string",
                        "example": "Cohort Test"
                    }
                },
                "type": "object"
            },
            "HeapCustomerConfig": {
                "title": "HeapCustomerConfig",
                "required": [
                    "fields"
                ],
                "properties": {
                    "fields": {
                        "type": "array",
                        "items": {
                            "allOf": [
                                {
                                    "$ref": "#/components/schemas/HeapCustomerConfigField"
                                }
                            ]
                        }
                    }
                },
                "type": "object"
            },
            "HeapCustomerConfigField": {
                "title": "HeapCustomerConfigField",
                "required": [
                    "field_id",
                    "value"
                ],
                "properties": {
                    "field_id": {
                        "description": "ID for customer input",
                        "type": "string",
                        "example": "heap_identity_user_property"
                    },
                    "field_display_name": {
                        "description": "Field name for customer input",
                        "type": "string",
                        "example": "Heap Identity User Property"
                    },
                    "field_type": {
                        "type": "string",
                        "enum": [
                            "identity_mapping"
                        ]
                    },
                    "value": {
                        "$ref": "#/components/schemas/HeapCustomerConfigFieldValue"
                    }
                },
                "type": "object"
            },
            "HeapCustomerConfigFieldValue": {
                "title": "HeapCustomerConfigFieldValue",
                "required": [
                    "id"
                ],
                "properties": {
                    "id": {
                        "description": "ID for field value",
                        "type": "string",
                        "example": "email"
                    },
                    "display_name": {
                        "description": "Display name for field value",
                        "type": "string",
                        "example": "email"
                    }
                },
                "type": "object"
            },
            "HeapSegmentInfo": {
                "title": "HeapSegmentInfo",
                "required": [
                    "id",
                    "name"
                ],
                "properties": {
                    "id": {
                        "description": "Segment ID from Heap",
                        "type": "string",
                        "format": "int64",
                        "example": 15225086
                    },
                    "name": {
                        "description": "Segment name from Heap",
                        "type": "string",
                        "example": "Heap Test Segment"
                    }
                },
                "type": "object"
            },
            "HeapSyncData": {
                "title": "HeapSyncData",
                "required": [
                    "segment",
                    "sync_info"
                ],
                "properties": {
                    "segment": {
                        "$ref": "#/components/schemas/HeapSegmentInfo"
                    },
                    "sync_info": {
                        "$ref": "#/components/schemas/HeapSyncInfo"
                    },
                    "add": {
                        "type": "array",
                        "items": {
                            "allOf": [
                                {
                                    "$ref": "#/components/schemas/HeapUserIdentifier"
                                }
                            ]
                        }
                    },
                    "remove": {
                        "type": "array",
                        "items": {
                            "allOf": [
                                {
                                    "$ref": "#/components/schemas/HeapUserIdentifier"
                                }
                            ]
                        }
                    }
                },
                "type": "object"
            },
            "HeapSyncInfo": {
                "title": "HeapSegmentInfo",
                "required": [
                    "page_number",
                    "total_pages",
                    "sync_task_id"
                ],
                "properties": {
                    "page_number": {
                        "description": "Page number for current sync",
                        "type": "integer",
                        "format": "int64",
                        "example": 1
                    },
                    "total_pages": {
                        "description": "Total number of pages for current sync",
                        "type": "integer",
                        "format": "int64",
                        "example": 2
                    },
                    "sync_task_id": {
                        "description": "Unique identifier for current sync",
                        "type": "string",
                        "format": "uuid",
                        "example": "ce011f7a-f60e-4c8c-9b9d-90c6b5ec455b"
                    }
                },
                "type": "object"
            },
            "HeapUserIdentifier": {
                "title": "HeapUserIdentifier",
                "required": [
                    "id"
                ],
                "properties": {
                    "id": {
                        "description": "User identifier customer chose as user mapping",
                        "type": "string",
                        "example": "user1@email.com"
                    }
                },
                "type": "object"
            },
            "HeapWebhookSyncRequest": {
                "title": "HeapWebhookSyncRequest",
                "required": [
                    "action_type",
                    "customer_config"
                ],
                "properties": {
                    "id_token": {
                        "description": "The identifier for customer",
                        "type": "string",
                        "format": "uuid",
                        "example": "bc2ae9f9-51ce-404e-9bf9-6b98cbc36f9e"
                    },
                    "action_type": {
                        "description": "Webhook action type",
                        "type": "string",
                        "enum": [
                            "segment.users.sync"
                        ]
                    },
                    "customer_config": {
                        "$ref": "#/components/schemas/HeapCustomerConfig"
                    },
                    "data": {
                        "$ref": "#/components/schemas/HeapSyncData"
                    }
                },
                "type": "object"
            },
            "IngestBatchAddContactsToList": {
                "title": "IngestBatchAddContactsToList",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestAddContactsToList"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchAddProductsToCart": {
                "title": "IngestBatchAddProductsToCart",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestAddProductsToCart"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchCreateContactactivities": {
                "title": "IngestBatchCreateContactactivities",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestCreateContactactivities"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchRemoveContactsFromList": {
                "title": "IngestBatchRemoveContactsFromList",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestRemoveContactsFromList"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchRemoveProductsFromCart": {
                "title": "IngestBatchRemoveProductsFromCart",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestRemoveProductsFromCart"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchUpsertContact": {
                "title": "IngestBatchUpsertContact",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestUpsertContact"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchUpsertOrder": {
                "title": "IngestBatchUpsertOrder",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestUpsertOrder"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestBatchUpsertSupplementsRecords": {
                "title": "IngestBatchUpsertSupplementsRecords",
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/IngestUpsertSupplementsRecords"
                },
                "maxItems": 100,
                "minItems": 1
            },
            "IngestAddContactsToList": {
                "title": "IngestAddContactsToList",
                "required": [
                    "contacts",
                    "listName"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contacts": {
                        "$ref": "#/components/schemas/ContactsIdentifiers"
                    },
                    "listName": {
                        "type": "string",
                        "example": "my-new-audience"
                    },
                    "isAllowedToCreateLists": {
                        "description": "If list creation on the fly is allowed",
                        "type": "boolean",
                        "example": false
                    }
                },
                "type": "object"
            },
            "IngestAddProductsToCart": {
                "title": "IngestAddProductsToCart",
                "required": [
                    "contact",
                    "items"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contact": {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    },
                    "items": {
                        "description": "Products collection",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ExtendedCartItem"
                        }
                    }
                },
                "type": "object"
            },
            "IngestCreateContactactivities": {
                "title": "IngestCreateContactactivities",
                "required": [
                    "contact",
                    "contactActivities"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contact": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "contactActivities": {
                        "description": "Events collection",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Event"
                        },
                        "maxItems": 100
                    }
                },
                "type": "object"
            },
            "IngestRemoveContactsFromList": {
                "title": "IngestRemoveContactsFromList",
                "required": [
                    "contacts",
                    "listIdentifier"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contacts": {
                        "$ref": "#/components/schemas/ContactsIdentifiers"
                    },
                    "listIdentifier": {
                        "description": "Value by which the list will be identified, searching by list name by default, but it may be overriden using listIdentifierKey property",
                        "type": "string",
                        "example": "my-test-list"
                    },
                    "listIdentifierKey": {
                        "type": "enum",
                        "enum": [
                            "name",
                            "segment_group_id",
                            "mparticle_group_id",
                            "amplitude_group_id",
                            "heap_group_id"
                        ],
                        "example": "segment_group_id"
                    }
                },
                "type": "object"
            },
            "IngestRemoveProductsFromCart": {
                "title": "IngestRemoveProductsFromCart",
                "required": [
                    "contact",
                    "items"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contact": {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    },
                    "items": {
                        "description": "Products identifiers collection",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/BaseCartItemForRemotion"
                        }
                    }
                },
                "type": "object"
            },
            "IngestUpsertContact": {
                "title": "IngestUpsertContact",
                "required": [
                    "identifiers",
                    "attributes"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "identifiers": {
                        "description": "Identifiers value should be non-empty string or integer",
                        "type": "object",
                        "example": {
                            "cid": "test",
                            "email": "email"
                        }
                    },
                    "identifiersPriority": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "example": [
                            "cid",
                            "email"
                        ]
                    },
                    "attributes": {
                        "$ref": "#/components/schemas/Attributes"
                    },
                    "forceSubscribe": {
                        "description": "If contact may be force subscribed",
                        "type": "boolean",
                        "example": false
                    },
                    "mergeOptions": {
                        "$ref": "#/components/schemas/ContactMergeOptions"
                    }
                },
                "type": "object"
            },
            "IngestUpsertOrder": {
                "title": "IngestUpsertOrder",
                "required": [
                    "contact",
                    "orderID",
                    "purchaseDate",
                    "status",
                    "items"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contact": {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    },
                    "items": {
                        "description": "Order items collection",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OrderItem"
                        }
                    },
                    "orderID": {
                        "type": "string",
                        "example": "test-order-id"
                    },
                    "purchaseDate": {
                        "type": "string",
                        "example": "2022-04-29T09:00:23+00:00"
                    },
                    "status": {
                        "type": "string",
                        "example": "Order Completed"
                    },
                    "totalAmount": {
                        "type": "decimal",
                        "example": 49.79
                    },
                    "tax": {
                        "type": "decimal",
                        "example": 3.21
                    },
                    "properties": {
                        "type": "object",
                        "example": {
                            "affiliation": "Google",
                            "campaign": "AdWords"
                        }
                    },
                    "shouldRemoveItemsFromCart": {
                        "type": "boolean",
                        "example": false
                    },
                    "discountApplication": {
                        "$ref": "#/components/schemas/DiscountApplication"
                    }
                },
                "type": "object"
            },
            "IngestUpsertSupplementsRecords": {
                "title": "IngestUpsertSupplementsRecords",
                "required": [
                    "contact",
                    "supplement",
                    "records"
                ],
                "properties": {
                    "source": {
                        "description": "Request origin",
                        "type": "string",
                        "example": "api.example.com"
                    },
                    "contact": {
                        "$ref": "#/components/schemas/ContactIdentifiers"
                    },
                    "records": {
                        "description": "Supplement records collection",
                        "type": "array",
                        "items": {
                            "type": "object"
                        },
                        "example": [
                            {
                                "id": 52,
                                "status": "active",
                                "updated_at": "2022-08-02T16:27:41+00:00"
                            },
                            {
                                "id": 632,
                                "status": "disabled",
                                "updated_at": "2020-02-08T14:27:00+05:00"
                            }
                        ]
                    },
                    "supplement": {
                        "description": "Supplement name",
                        "type": "string",
                        "example": "active_subscriptions"
                    },
                    "updatedDateField": {
                        "description": "Supplement field name for updated date (allows to skip updates with older records)",
                        "type": "string",
                        "example": "updated_at"
                    }
                },
                "type": "object"
            },
            "MparticleAudienceMembershipChange": {
                "title": "MparticleAudienceMembershipChange",
                "required": [
                    "type",
                    "id",
                    "timestamp_ms",
                    "firehose_version"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "audience_membership_change_request"
                        ]
                    },
                    "id": {
                        "type": "uuid"
                    },
                    "timestamp_ms": {
                        "type": "integer"
                    },
                    "firehose_version": {
                        "type": "string"
                    },
                    "account": {
                        "type": "object"
                    },
                    "user_profiles": {
                        "type": "object"
                    }
                },
                "type": "object",
                "example": {
                    "type": "audience_membership_change_request",
                    "id": "9d76a904-b5cf-4eb1-b8b5-ae8302d3f4fc",
                    "timestamp_ms": 1644244051343,
                    "firehose_version": "2.8.0",
                    "account": {
                        "account_id": 123456,
                        "account_settings": {
                            "Example String Setting": "Example Setting Value",
                            "Example Boolean Setting": "false",
                            "Example Integer Setting": "123"
                        }
                    },
                    "user_profiles": [
                        {
                            "user_identities": [
                                {
                                    "type": "email",
                                    "encoding": "md5",
                                    "value": "e179e95c00e7718ab4a23840f992ea63"
                                },
                                {
                                    "type": "customer",
                                    "encoding": "md5",
                                    "value": "4739c5c11d833bb199c16ff95a92b267"
                                }
                            ],
                            "device_identities": [
                                {
                                    "type": "ios_advertising_id",
                                    "encoding": "raw",
                                    "value": "66b728c2-f9a4-4d87-82ef-ce07414fe3f7"
                                },
                                {
                                    "type": "ios_vendor_id",
                                    "encoding": "raw",
                                    "value": "97b826c2-ab80-4876-a184-db36cc39b1ee"
                                },
                                {
                                    "type": "google_advertising_id",
                                    "encoding": "raw",
                                    "value": "31a22ef0-f119-48d4-b009-a217a26a862a"
                                },
                                {
                                    "type": "android_id",
                                    "encoding": "raw",
                                    "value": "a0504a8cfa15ce2c"
                                }
                            ],
                            "partner_identities": [
                                {
                                    "type": "partner_id",
                                    "encoding": "raw",
                                    "value": "partnerId"
                                }
                            ],
                            "audiences": [
                                {
                                    "audience_id": 456,
                                    "audience_name": "Example Audience Name",
                                    "audience_subscription_settings": {
                                        "Example Audience-specific setting": "Example Value"
                                    },
                                    "action": "add"
                                },
                                {
                                    "audience_id": 789,
                                    "audience_name": "Example Audience Name 2",
                                    "audience_subscription_settings": {
                                        "Example Audience-specific setting": "Example Value 2"
                                    },
                                    "action": "attribute_update",
                                    "user_attributes": [
                                        {
                                            "key": "Some Key",
                                            "value": "9999999",
                                            "action": "upsert"
                                        },
                                        {
                                            "key": "Churned",
                                            "action": "delete"
                                        },
                                        []
                                    ]
                                },
                                {
                                    "audience_id": 654,
                                    "audience_name": "Example Audience Name 4",
                                    "audience_subscription_settings": {
                                        "Example Audience-specific setting": "Example Value 4"
                                    },
                                    "action": "delete"
                                }
                            ],
                            "mpid": "12345"
                        }
                    ]
                }
            },
            "MparticleAudienceSubscription": {
                "title": "MparticleAudienceSubscription",
                "required": [
                    "type",
                    "id",
                    "timestamp_ms",
                    "firehose_version"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "audience_subscription_request"
                        ]
                    },
                    "id": {
                        "type": "uuid"
                    },
                    "timestamp_ms": {
                        "type": "integer"
                    },
                    "firehose_version": {
                        "type": "string"
                    },
                    "account": {
                        "type": "object"
                    },
                    "audience_id": {
                        "type": "integer"
                    },
                    "audience_name": {
                        "type": "string"
                    },
                    "action": {
                        "type": "string"
                    }
                },
                "type": "object",
                "example": {
                    "type": "audience_subscription_request",
                    "id": "8c820e89-3e34-48c7-affc-7bd87f7a1e28",
                    "timestamp_ms": 1644244051347,
                    "firehose_version": "2.8.0",
                    "account": {
                        "account_id": 123456,
                        "account_settings": {
                            "Example String Setting": "Example Setting Value",
                            "Example Boolean Setting": "false",
                            "Example Integer Setting": "123",
                            "apiKey": "sample API Key"
                        }
                    },
                    "audience_id": 1234,
                    "audience_name": "New Users Low Engagement",
                    "action": "add"
                }
            },
            "MparticleEventProcessing": {
                "title": "MparticleEventProcessing",
                "required": [
                    "type",
                    "id",
                    "timestamp_ms",
                    "firehose_version"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "event_processing_request"
                        ]
                    },
                    "id": {
                        "type": "uuid"
                    },
                    "timestamp_ms": {
                        "type": "integer"
                    },
                    "firehose_version": {
                        "type": "string"
                    },
                    "source_id": {
                        "type": "string"
                    },
                    "account": {
                        "type": "object"
                    },
                    "partner_identities": {
                        "type": "object"
                    },
                    "user_identities": {
                        "type": "object"
                    },
                    "user_attributes": {
                        "type": "object"
                    },
                    "runtime_environment": {
                        "type": "object"
                    },
                    "events": {
                        "type": "object"
                    },
                    "mpid": {
                        "type": "string"
                    }
                },
                "type": "object",
                "example": {
                    "type": "event_processing_request",
                    "id": "e4d2dc7d-6970-4149-9ed7-9ac32022668b",
                    "timestamp_ms": 1644244051356,
                    "firehose_version": "2.8.0",
                    "source_id": "a2037396-6b0a-4182-961d-0c058b405786",
                    "account": {
                        "account_id": 123456,
                        "account_settings": {
                            "Example String Setting": "Example Setting Value",
                            "Example Boolean Setting": "false",
                            "Example Integer Setting": "123",
                            "apiKey": "sample API Key"
                        }
                    },
                    "partner_identities": [
                        {
                            "type": "a_partner_id",
                            "encoding": "raw",
                            "value": "partnerId"
                        }
                    ],
                    "user_identities": [
                        {
                            "type": "email",
                            "encoding": "md5",
                            "value": "e179e95c00e7718ab4a23840f992ea63"
                        },
                        {
                            "type": "google",
                            "encoding": "raw",
                            "value": "1234567890"
                        },
                        {
                            "type": "facebook",
                            "encoding": "raw",
                            "value": "1234567890"
                        },
                        {
                            "type": "other",
                            "encoding": "raw",
                            "value": "1234567890"
                        },
                        {
                            "type": "customer",
                            "encoding": "md5",
                            "value": "4739c5c11d833bb199c16ff95a92b267"
                        }
                    ],
                    "user_attributes": {
                        "$City": "Boca Raton",
                        "$FirstName": "Brian",
                        "$Country": "USA",
                        "$State": "FL",
                        "$Zip": "33431",
                        "$Gender": "M",
                        "$LastName": "O'Brian"
                    },
                    "runtime_environment": {
                        "type": "android",
                        "client_ip_address": "192.168.1.15",
                        "sdk_version": "6.12.1",
                        "http_header_user_agent": "user-agent",
                        "identities": [
                            {
                                "type": "android_id",
                                "encoding": "raw",
                                "value": "a0504a8cfa15ce2c"
                            },
                            {
                                "type": "google_advertising_id",
                                "encoding": "raw",
                                "value": "31a22ef0-f119-48d4-b009-a217a26a862a"
                            },
                            {
                                "type": "google_cloud_messaging_token",
                                "encoding": "raw",
                                "value": "1234567890"
                            }
                        ],
                        "build_id": "M4=rc20",
                        "brand": "Samsung",
                        "product": "Galaxy S3",
                        "name": "My Galaxy S3",
                        "manufacturer": "Samsung",
                        "os_version": "4.1.1",
                        "model": "Galaxy S3",
                        "screen_height": 736,
                        "screen_width": 1280,
                        "screen_dpi": 160,
                        "country": "US",
                        "locale_language": "en",
                        "locale_country": "en_US",
                        "network_country": "US",
                        "network_carrier": "Verizon",
                        "network_code": "MobileNetworkCode",
                        "network_mobile_country_code": "MobileCountryCode",
                        "timezone_offset": -5,
                        "timezone_name": "UTC-5",
                        "is_tablet": false,
                        "android_sdk_level": 0,
                        "application_name": "App Name",
                        "application_version": "1.2.001-dbg",
                        "application_package": "com.mparticle.TravelApp",
                        "install_referrer": "utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term%3Drunning%252Bshoes%26utm_content%3Dlogolink%26utm_campaign%3Dspring_sale"
                    },
                    "events": [
                        {
                            "type": "custom_event",
                            "id": "6957b85a-b0df-4cce-8b26-b64d38eebaec",
                            "timestamp_ms": 1644244051349,
                            "source_id": "f0fb3db6-0b98-4135-931b-06c2b20aac9e",
                            "session_id": 123456789,
                            "location": {
                                "latitude": 47.6062,
                                "longitude": 122.3231,
                                "accuracy": 0
                            },
                            "name": "customEvent",
                            "custom_event_type": "other",
                            "attributes": {
                                "event_attribute": "value"
                            }
                        },
                        {
                            "type": "product_action",
                            "id": "aa3dfffd-6906-4097-b23c-f04881d3c31d",
                            "timestamp_ms": 1644244051349,
                            "source_id": "920c59b9-e722-4e36-a8a8-3f60857aa98b",
                            "session_id": 123456789,
                            "action": "add_to_cart",
                            "transaction_id": "transactionId",
                            "total_amount": 11,
                            "tax_amount": 1,
                            "shipping_amount": 0,
                            "currency_code": "USD",
                            "coupon_code": "coupon",
                            "products": [
                                {
                                    "id": "id",
                                    "name": "name",
                                    "brand": "brand",
                                    "category": "category",
                                    "variant": "variant",
                                    "position": 1,
                                    "price": 10,
                                    "quantity": 1,
                                    "total_amount": 10
                                }
                            ],
                            "attributes": {
                                "event_attribute": "value"
                            }
                        }
                    ],
                    "source_channel": "native",
                    "device_application_stamp": "33ebfefa-bf9e-485f-8a03-e8149da91f1d",
                    "consent_state": {
                        "gdpr_consent_state": {
                            "consentPurpose": {
                                "consented": true,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            }
                        },
                        "ccpa_consent_state": {
                            "data_sale_opt_out": {
                                "consented": true,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            }
                        }
                    },
                    "system_notifications": [
                        {
                            "type": "gdpr_consent_state",
                            "purpose": "consentPurpose",
                            "old_gdpr_consent_state": {
                                "consented": false,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            },
                            "new_gdpr_consent_state": {
                                "consented": true,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            }
                        },
                        {
                            "type": "ccpa_consent_state",
                            "purpose": "data_sale_opt_out",
                            "old_ccpa_consent_state": {
                                "consented": false,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            },
                            "new_ccpa_consent_state": {
                                "consented": true,
                                "document": "document",
                                "timestamp_unixtime_ms": 1644244051349,
                                "location": "location",
                                "hardware_id": "hardware id"
                            }
                        }
                    ],
                    "mpid": "12345"
                }
            },
            "MparticleModuleRegistration": {
                "title": "MparticleModuleRegistration",
                "required": [
                    "type",
                    "id",
                    "timestamp_ms",
                    "firehose_version"
                ],
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "module_registration_request"
                        ]
                    },
                    "id": {
                        "type": "string"
                    },
                    "timestamp_ms": {
                        "type": "integer"
                    },
                    "firehose_version": {
                        "type": "string"
                    }
                },
                "type": "object",
                "example": {
                    "type": "module_registration_request",
                    "id": "e91ec0c6-69f3-4dae-b1a1-b0c29f27ba6e",
                    "timestamp_ms": 1644244051358,
                    "firehose_version": "2.8.0"
                }
            },
            "Subscription": {
                "title": "RechargeSubscription",
                "required": [
                    "subscription"
                ],
                "properties": {
                    "subscription": {
                        "type": "object",
                        "example": {
                            "id": 89559201,
                            "address_id": 48563471,
                            "customer_id": 43845860,
                            "analytics_data": {
                                "utm_params": []
                            },
                            "cancellation_reason": null,
                            "cancellation_reason_comments": null,
                            "cancelled_at": null,
                            "charge_interval_frequency": "30",
                            "created_at": "2021-02-25T21:27:19+00:00",
                            "expire_after_specific_number_of_charges": null,
                            "external_product_id": {
                                "ecommerce": "2103271587891"
                            },
                            "external_variant_id": {
                                "ecommerce": "18261278883891"
                            },
                            "has_queued_charges": true,
                            "is_prepaid": true,
                            "is_skippable": false,
                            "is_swappable": false,
                            "max_retries_reached": false,
                            "next_charge_scheduled_at": "2020-07-15",
                            "order_day_of_month": null,
                            "order_day_of_week": null,
                            "order_interval_frequency": "15",
                            "order_interval_unit": "day",
                            "price": 5,
                            "product_title": "Powder Milk 50.00% Off Auto renew",
                            "properties": [],
                            "quantity": 3,
                            "sku": null,
                            "sku_override": false,
                            "status": "active",
                            "updated_at": "2020-07-10T10:30:51",
                            "variant_title": "1 / Powder",
                            "include": {
                                "customer": {
                                    "email": "test@example.com"
                                }
                            }
                        }
                    }
                },
                "type": "object"
            },
            "SegmentAddContactToList": {
                "title": "SegmentAddContactToList",
                "required": [
                    "groupId"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "groupId": "123",
                    "listName": "segmentList"
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "groupId": {
                                "type": "string"
                            },
                            "listName": {
                                "type": "string"
                            }
                        }
                    }
                ]
            },
            "SegmentAddProductToCart": {
                "title": "SegmentAddProductToCart",
                "required": [
                    "productID",
                    "sku",
                    "qty",
                    "category",
                    "name"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "productID": "123",
                    "sku": "TEST-SKU",
                    "qty": 2,
                    "category": "Test category",
                    "name": "Test product",
                    "description": "Test description",
                    "itemPrice": 65.32,
                    "url": "https://example.com/product",
                    "imageUrl": "https://cdn.example.com/product.jpg",
                    "properties": {
                        "variant": "black",
                        "size": "xs"
                    }
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "productID": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            },
                            "qty": {
                                "type": "integer"
                            },
                            "category": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "itemPrice": {
                                "type": "number",
                                "format": "float"
                            },
                            "url": {
                                "type": "string"
                            },
                            "imageUrl": {
                                "type": "string"
                            },
                            "properties": {
                                "type": "object"
                            }
                        }
                    }
                ]
            },
            "SegmentCreateContactactivity": {
                "title": "SegmentCreateContactactivity",
                "required": [
                    "action",
                    "time"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "action": "click",
                    "time": "2020/24/24",
                    "properties": {
                        "test1": 1,
                        "test2": 2
                    }
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "action": {
                                "type": "string"
                            },
                            "time": {
                                "type": "string"
                            },
                            "properties": {
                                "type": "object"
                            },
                            "context": {
                                "type": "object"
                            },
                            "type": {
                                "type": "string"
                            }
                        }
                    }
                ]
            },
            "SegmentIdentifiableRequest": {
                "title": "SegmentIdentifiableRequest",
                "properties": {
                    "segmentIdKey": {
                        "type": "string"
                    },
                    "segmentId": {
                        "type": "string"
                    },
                    "anonymousId": {
                        "type": "string"
                    },
                    "userIdentities": {
                        "type": "object"
                    }
                },
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    }
                }
            },
            "SegmentMergeContacts": {
                "title": "SegmentMergeContacts",
                "properties": {
                    "attributes": {
                        "type": "object"
                    }
                },
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "previousId": "previous-id"
                }
            },
            "SegmentOrderItem": {
                "title": "SegmentOrderItem",
                "required": [
                    "productID",
                    "sku",
                    "name"
                ],
                "properties": {
                    "productID": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "category": {
                        "type": "string"
                    },
                    "manufacturerName": {
                        "type": "string"
                    },
                    "itemPrice": {
                        "type": "number",
                        "format": "float"
                    },
                    "qty": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "imageUrl": {
                        "type": "string"
                    },
                    "properties": {
                        "type": "object"
                    }
                },
                "type": "object",
                "example": {
                    "productID": "123",
                    "sku": "test-sku",
                    "name": "test-name",
                    "category": "test-category",
                    "manufacturerName": "test-brand",
                    "itemPrice": 443.23,
                    "qty": 2,
                    "url": "https://example.com/product",
                    "imageUrl": "https://cdn.example.com/product.jpg",
                    "properties": {
                        "variant": "black",
                        "size": "size"
                    }
                }
            },
            "SegmentRemoveContactFromList": {
                "title": "SegmentRemoveContactFromList",
                "required": [
                    "groupId"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "groupId": "123"
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "groupId": {
                                "type": "string"
                            }
                        }
                    }
                ]
            },
            "SegmentRemoveProductFromCart": {
                "title": "SegmentRemoveProductFromCart",
                "required": [
                    "productID",
                    "qty"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "productID": "123",
                    "qty": 2,
                    "sku": "123"
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "productID": {
                                "type": "string"
                            },
                            "qty": {
                                "type": "integer"
                            },
                            "sku": {
                                "type": "string",
                                "nullable": true
                            }
                        }
                    }
                ]
            },
            "SegmentUpsertContact": {
                "title": "SegmentUpsertContact",
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "attributes": {
                        "test1": 1,
                        "test2": 2
                    }
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "attributes": {
                                "type": "object"
                            }
                        }
                    }
                ]
            },
            "SegmentUpsertOrder": {
                "title": "SegmentUpsertOrder",
                "required": [
                    "orderID",
                    "purchaseDate",
                    "status"
                ],
                "type": "object",
                "example": {
                    "segmentIdKey": "segment_id",
                    "segmentId": "test-user-ouxty4jxdm",
                    "anonymousId": "5cwt1zukfza",
                    "userIdentities": {
                        "cid": "test",
                        "email": "email"
                    },
                    "orderID": "123",
                    "purchaseDate": "2015-12-12T19:11:01.249Z",
                    "status": "Completed",
                    "totalAmount": 532.12,
                    "properties": {
                        "tax": 32.43,
                        "affiliate": "Google"
                    },
                    "items": [
                        {
                            "productID": "123",
                            "sku": "test-sku",
                            "name": "test-name",
                            "category": "test-category",
                            "manufacturerName": "test-brand",
                            "itemPrice": 443.23,
                            "qty": 2,
                            "url": "https://example.com/product",
                            "imageUrl": "https://cdn.example.com/product.jpg",
                            "properties": {
                                "variant": "black",
                                "size": "size"
                            }
                        }
                    ],
                    "discountApplication": {
                        "type": "fixed",
                        "amount": 10.4
                    }
                },
                "allOf": [
                    {
                        "$ref": "#/components/schemas/SegmentIdentifiableRequest"
                    },
                    {
                        "properties": {
                            "orderID": {
                                "type": "string"
                            },
                            "purchaseDate": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "status": {
                                "type": "string"
                            },
                            "totalAmount": {
                                "type": "number",
                                "format": "float"
                            },
                            "properties": {
                                "type": "object"
                            },
                            "items": {
                                "type": "array",
                                "items": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/SegmentOrderItem"
                                        }
                                    ]
                                }
                            },
                            "discountApplication": {
                                "$ref": "#/components/schemas/DiscountApplication"
                            }
                        }
                    }
                ]
            }
        },
        "securitySchemes": {
            "cordial_api_key": {
                "type": "apiKey",
                "description": "Cordial API Key",
                "name": "x-api-key",
                "in": "header"
            }
        }
    }
}