fix: Add new route to create team routing-form response again(after revert earlier) (#22407)

* Revert "revert: "fix: Add new route to create team routing-form response (#22347)" (#22399)"

This reverts commit e6c36af3b4.

* Update the documentation

* Remove versioning
This commit is contained in:
Hariom Balhara authored and GitHub committed 2025-07-17 11:33:51 +05:30
1 parent 4f95cff70e
commit ec58e59865
15 files changed
+5469 -1463

No files matched your search

+250 -116
View File
@@ -5065,6 +5065,134 @@
"tags": [
"Orgs / Teams / Routing forms / Responses"
]
},
"post": {
"operationId": "OrganizationsTeamsRoutingFormsResponsesController_createRoutingFormResponse",
"summary": "Create routing form response and get available slots",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "teamId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "routingFormId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "start",
"required": true,
"in": "query",
"description": "\n Time starting from which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to start of day or specify hours:\n 2024-08-13 (will have hours 00:00:00 aka at very beginning of the date) or you can specify hours manually like 2024-08-13T09:00:00Z\n ",
"example": "2050-09-05",
"schema": {
"type": "string"
}
},
{
"name": "end",
"required": true,
"in": "query",
"description": "\n Time until which available slots should be checked.\n \n Must be in UTC timezone as ISO 8601 datestring.\n \n You can pass date without hours which defaults to end of day or specify hours:\n 2024-08-20 (will have hours 23:59:59 aka at the very end of the date) or you can specify hours manually like 2024-08-20T18:00:00Z",
"example": "2050-09-06",
"schema": {
"type": "string"
}
},
{
"name": "timeZone",
"required": false,
"in": "query",
"description": "Time zone in which the available slots should be returned. Defaults to UTC.",
"example": "Europe/Rome",
"schema": {
"type": "string"
}
},
{
"name": "duration",
"required": false,
"in": "query",
"description": "If event type has multiple possible durations then you can specify the desired duration here. Also, if you are fetching slots for a dynamic event then you can specify the duration her which defaults to 30, meaning that returned slots will be each 30 minutes long.",
"example": "60",
"schema": {
"type": "number"
}
},
{
"name": "format",
"required": false,
"in": "query",
"description": "Format of slot times in response. Use 'range' to get start and end times.",
"example": "range",
"schema": {
"enum": [
"range",
"time"
],
"type": "string"
}
},
{
"name": "bookingUidToReschedule",
"required": false,
"in": "query",
"description": "The unique identifier of the booking being rescheduled. When provided will ensure that the original booking time appears within the returned available slots when rescheduling.",
"example": "abc123def456",
"schema": {
"type": "string"
}
},
{
"name": "queueResponse",
"required": false,
"in": "query",
"description": "Whether to queue the form response.",
"example": true,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateRoutingFormResponseOutput"
}
}
}
}
},
"tags": [
"Orgs / Teams / Routing forms / Responses"
]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses/{responseId}": {
@@ -17627,7 +17755,7 @@
},
"bookingFields": {
"type": "array",
"description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.",
"description": "Complete set of booking form fields. This array replaces all existing booking fields. To modify existing fields, first fetch the current event type, then include all desired fields in this array. Sending only one field will remove all other custom fields, keeping only default fields plus the provided one.",
"items": {
"oneOf": [
{
@@ -20335,7 +20463,7 @@
},
"bookingFields": {
"type": "array",
"description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.",
"description": "Complete set of booking form fields. This array replaces all existing booking fields. To modify existing fields, first fetch the current event type, then include all desired fields in this array. Sending only one field will remove all other custom fields, keeping only default fields plus the provided one.",
"items": {
"oneOf": [
{
@@ -24822,6 +24950,126 @@
"data"
]
},
"Routing": {
"type": "object",
"properties": {
"queuedResponseId": {
"type": "string",
"nullable": true,
"description": "The ID of the queued form response. Only present if the form response was queued.",
"example": "123"
},
"responseId": {
"type": "number",
"nullable": true,
"description": "The ID of the routing form response.",
"example": 123
},
"teamMemberIds": {
"description": "Array of team member IDs that were routed to handle this booking.",
"example": [
101,
102
],
"type": "array",
"items": {
"type": "number"
}
},
"teamMemberEmail": {
"type": "string",
"description": "The email of the team member assigned to handle this booking.",
"example": "[email protected]"
},
"skipContactOwner": {
"type": "boolean",
"description": "Whether to skip contact owner assignment from CRM integration.",
"example": true
},
"crmAppSlug": {
"type": "string",
"description": "The CRM application slug for integration.",
"example": "salesforce"
},
"crmOwnerRecordType": {
"type": "string",
"description": "The CRM owner record type for contact assignment.",
"example": "Account"
}
},
"required": [
"teamMemberIds"
]
},
"CreateRoutingFormResponseOutputData": {
"type": "object",
"properties": {
"eventTypeId": {
"type": "number",
"description": "The ID of the event type that was routed to.",
"example": 123
},
"routing": {
"description": "The routing information.",
"example": {
"eventTypeId": 123,
"routing": {
"teamMemberIds": [
101,
102
],
"teamMemberEmail": "[email protected]",
"skipContactOwner": true
}
},
"allOf": [
{
"$ref": "#/components/schemas/Routing"
}
]
},
"routingCustomMessage": {
"type": "string",
"description": "A custom message to be displayed to the user in case of routing to a custom page.",
"example": "This is a custom message."
},
"routingExternalRedirectUrl": {
"type": "string",
"description": "The external redirect URL to be used in case of routing to a non cal.com event type URL.",
"example": "https://example.com/"
},
"slots": {
"oneOf": [
{
"$ref": "#/components/schemas/SlotsOutput_2024_09_04"
},
{
"$ref": "#/components/schemas/RangeSlotsOutput_2024_09_04"
}
]
}
}
},
"CreateRoutingFormResponseOutput": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "success",
"enum": [
"success",
"error"
]
},
"data": {
"$ref": "#/components/schemas/CreateRoutingFormResponseOutputData"
}
},
"required": [
"status",
"data"
]
},
"UpdateRoutingFormResponseInput": {
"type": "object",
"properties": {
@@ -25453,51 +25701,6 @@
"timeZone"
]
},
"Routing": {
"type": "object",
"properties": {
"responseId": {
"type": "number",
"description": "The ID of the routing form response that determined this booking assignment.",
"example": 123
},
"teamMemberIds": {
"description": "Array of team member IDs that were routed to handle this booking.",
"example": [
101,
102
],
"type": "array",
"items": {
"type": "number"
}
},
"teamMemberEmail": {
"type": "string",
"description": "The email of the team member assigned to handle this booking.",
"example": "[email protected]"
},
"skipContactOwner": {
"type": "boolean",
"description": "Whether to skip contact owner assignment from CRM integration.",
"example": true
},
"crmAppSlug": {
"type": "string",
"description": "The CRM application slug for integration.",
"example": "salesforce"
},
"crmOwnerRecordType": {
"type": "string",
"description": "The CRM owner record type for contact assignment.",
"example": "Account"
}
},
"required": [
"responseId",
"teamMemberIds"
]
},
"CreateBookingInput_2024_08_13": {
"type": "object",
"properties": {
@@ -28344,75 +28547,6 @@
"data"
]
},
"CreateRoutingFormResponseOutputData": {
"type": "object",
"properties": {
"eventTypeId": {
"type": "number",
"description": "The ID of the event type that was routed to.",
"example": 123
},
"routing": {
"description": "The routing information.",
"example": {
"eventTypeId": 123,
"routing": {
"teamMemberIds": [
101,
102
],
"teamMemberEmail": "[email protected]",
"skipContactOwner": true
}
},
"allOf": [
{
"$ref": "#/components/schemas/Routing"
}
]
},
"routingCustomMessage": {
"type": "string",
"description": "A custom message to be displayed to the user in case of routing to a custom page.",
"example": "This is a custom message."
},
"routingExternalRedirectUrl": {
"type": "string",
"description": "The external redirect URL to be used in case of routing to a non cal.com event type URL.",
"example": "https://example.com/"
},
"slots": {
"oneOf": [
{
"$ref": "#/components/schemas/SlotsOutput_2024_09_04"
},
{
"$ref": "#/components/schemas/RangeSlotsOutput_2024_09_04"
}
]
}
}
},
"CreateRoutingFormResponseOutput": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "success",
"enum": [
"success",
"error"
]
},
"data": {
"$ref": "#/components/schemas/CreateRoutingFormResponseOutputData"
}
},
"required": [
"status",
"data"
]
},
"RequestEmailVerificationInput": {
"type": "object",
"properties": {