--- title: "This can be used to send multiple event types in a single request." slug: "this-can-be-used-to-send-multiple-event-types-in-a-single-request-1" updated: 2024-12-18T18:55:03Z published: 2024-12-18T18:55:03Z canonical: "docs.xgen.ai/this-can-be-used-to-send-multiple-event-types-in-a-single-request-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xgen.ai/llms.txt > Use this file to discover all available pages before exploring further. # This can be used to send multiple event types in a single request. Post/customers/{customerId}/users/{userId}/batch SecurityAPI KeyHeader parameter nameaccess_token Access token Authentication Path parameterscustomerIdstringRequired userIdstringRequired Body parametersArray of object object recstring Default parameter to send with event payload Example1 idsitestring The tracking_id of the site Example1234 urlstring The URL of the page Examplehttps://example.com urlrefstring The referrer URL Examplehttps://example.com localestring The locale of the user Exampleen_US uidstring A string representation of the user object Example{"customer_id":"customer_id","user_type":"return_user","testing_group_name":"Inactive","session_id":"524e0542-5713-4755-a8c0-1430cbd58aa9"} c_pstring The product_id. Used for events such as product_view, product_add, product_purchase, etc. Example1234 c_nstring The ID of the element or deployment to track Examplesm_el_1234 c_tstring A comma separated list of products Example1234,5678,9012 c_istring A description of the event type ExamplesearchResult cvarstring A string representation of a JSON object containing information about the product. _pkp is the product's price, _pks is the product's sku, _pkn is the product's name, _pkc is the product's currency. Example{"2":["_pkp",1000],"3":["_pks","1234"],"4":["_pkn","product_name"],"5":["_pkc","{"currency_code":"USD"}"]} ec_itemsstring A string representation of a JSON array containing information about the products. Index 0 is the product's sku, index 1 is the product's name, index 2 is the product's currency, index 3 is the product's price, and index 4 is the product's quantity. Example[["1234","Product Name","{"currency_code":"usd"}",1000,1]] ec_idstring The Order ID. Should be sent with purchase events. Example1234 revenuenumber The revenue. Should be sent with purchase events. Example1000 contextobject A JSON object of context data. Used to pass dynamic, additional data to the tracker. Example{ "key1": "value1", "key2": 1000, "nested": { "key": "value" }, "array": [ "1", "2", "3" ] } query_idstring Used for search events. The query id is sent to the tracker to be able to identify and group search events. Example4893e2d0-2a35-4c58-81b6-ad3906518563 action_namestring The name of the action that was performed. Examplecontent_tracking action_detailstring Details on the action that was performed. Examplesearch_result action_typestring The meta action that was performed. Examplesearch_service e_cstring The category of the event ExampleError tracking e_astring The action type of the event. Used to send a message or description. ExampleAn error occurred e_nstring The name of the event ExampleTypeError:... e_vstring The value of the event ExampleError tracking ec_stnumber The total revenue Example1000 ec_txnumber The total tax Example1000 ec_dtstring The total discount Example100 idgoalstring The goal ID Example0 versionstring The version of the event Example2 Responses200 Successful response 400 Bad request 401 Unauthorized 403 Forbidden 500 Internal server error