{"method":"POST","path":"https://api.revcent.com/v2/url_parameter_sets","summary":"Create A URL Parameter Set","description":"Create a URL Parameter Set, which will issue a unique URL Parameter Set ID. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/CreateUrlParameterSet.md for an in-depth overview of this operation.","operationId":"CreateUrlParameterSet","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"The URL Parameter Set name. Must be unique from other URL Parameter Sets."},"description":{"type":"string","description":"The URL Parameter Set description."},"enabled":{"type":"boolean","description":"Whether the URL Parameter Set is enabled."},"url_parameters":{"type":"array","description":"A list of URL parameters to save. You indicate the URL parameter to save along with the metadata name to save the value as.","items":{"type":"object","additionalProperties":false,"properties":{"url_parameter":{"description":"The URL parameter to save. For example, if the URL parameter is 'utm_source', then RevCent will save the value of the utm_source parameter for all visitors and purchases to your stores via RevCent's in house DNS tracking.","type":"string"},"metadata_name":{"description":"The name to save the URL parameter as in RevCent's metadata. It is common practice to set the metadata_name as the same as the url_parameter. If left empty, RevCent will save the URL parameter value to metadata using the URL parameter as the metadata name. For example, if the URL parameter is 'utm_source', and the metadata_name is left empty, then RevCent will save the value of the utm_source URL parameter to metadata with the metadata name of 'utm_source'. If the URL parameter is 'utm_source', and the metadata_name is set to 'source', then RevCent will save the value of the utm_source URL parameter to the visitors' metadata with the metadata name of 'source'. Recommended to leave empty or set the same as url_parameter.","type":"string"},"default_value":{"description":"The default value to save for the URL parameter if the URL parameter is present in the URL but you wish to save a default value intead of the value in the URL. This is optional. If not provided, RevCent will save the value in the URL. For example, if the URL parameter is 'utm_source', but you want to save the value as 'organic' regardless of the actual utm_source value in the URL, then you would set the default_value to 'organic'. Recommended to leave empty.","type":"string"},"days":{"description":"The number of days to save the URL parameter name/value to a specific visitor, i.e. the cookie age for the visitor for the URL parameter. This is optional. If not provided, RevCent will use the default value of 30 days. Recommended value is 30.","type":"integer"}}}}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"url_parameter_set_id":{"type":"string","description":"A 20 character URL parameter set ID.","minLength":20,"maxLength":20},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}