{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":466,"path":"api-reference/rest-apis/appointment-open-api.md","title":"Appointment Open API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Appointment Open API\n\nThe Appointment Open API is a telecommunication API that allows you to interact with the appointment booking application. Use this API to book appointments and search available time slots.\n\nThe Appointment Open API is a ServiceNow® implementation of the Open API TMForum TMF646 Appointment REST API specification and is conformance certified by TM Forum. This implementation is based on [TMF646 Appointment API REST Specification R16.0.1](https://www.tmforum.org/resources/specification/tmf646-appointment-api-rest-specification-r16-0-1/).\n\n\\[Omitted image \"tmf-conformance.png\"\\] Alt text: TMF conformance logo\n\nThis API requires the following plugins available on the ServiceNow Store.\n\n-   Appointment Booking \\(com.snc.appointment\\_booking\\)\n-   Field Service Management \\(com.snc.work\\_management\\)\n-   Field Service Management for Telecommunications \\(com.sn\\_fsmt\\)\n-   Telecommunication Open APIs \\(com.sn\\_tmf\\_api\\)\n\nBefore using this API, Appointment Booking Configuration and Service Configuration must be set up. In addition, a task for which the appointment is being booked must exist.\n\nThis API is provided within the `sn_tmf_api` namespace. The calling user must have the sn\\_tmf\\_api.appointment\\_integrator role.\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## Appointment Open - DELETE /api/sn\\_tmf\\_api/appointment/appointment/\\{id\\}\n\nDeletes an appointment record with a given ID.\n\n### URL format\n\nDefault URL: `/api/sn_tmf_api/appointment/appointment/{id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment record to delete. Data type: String\n\nTable: Appointment booking \\[sn\\_apptmnt\\_booking\\_appointment\\_booking\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|404|Not found. The requested item wasn't found.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nResponse message acknowledging successful deletion.Success: \"The appointment \\(&lt;id&gt;\\) is successfully cancelled.\"\n\nErrors:\n\n-   \"Appointment cancellation failed.\": The ID can't be found in the system and returns a 404 status code.\n-   \"Appointment cancellation failed.\": The appointment is already in a cancelled or completed state or can't be deleted, and returns a 404 status code.\n-   \"The appointment \\(&lt;id&gt;\\) can't be cancelled as it is beyond the Cancel by time.\": The appointment is already beyond the ‘cancel by time’, which is configured in the appointment booking service configuration. Returns a 400 status code.\n\nData type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example deletes an appointment with a specific ID.\n\n```\ncurl \"http://instance.servicenow.com/api/sn_tmf_api/appointment/appointment/68cc0a5a9314521060320dd548373\" \\ \n--request GET\\ \n--user 'username':'password' \n```\n\nResponse body:\n\n```\n\"The appointment (68cc0a5a9314521060320dd548373cbd) is successfully cancelled.\"\n```\n\n## Appointment Open - GET /api/sn\\_tmf\\_api/appointment/searchTimeSlot\n\nReturns time slots that were configured in the appointment booking service configuration along with their availability.\n\n### URL format\n\n`/api/sn_tmf_api/appointment/searchTimeSlot`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncatalog\\_id\n\n</td><td>\n\nRequired. Sys\\_id of the record producer configured with an appointment booking service configuration. Data type: String\n\nTable: Record Producer \\[sc\\_cat\\_item\\_producer\\]\n\n</td></tr><tr id=\"serviceTest-response-testMeasureDefinition.thresholdRule.consequence.validFor.endDateTime\"><td>\n\nend\\_date\n\n</td><td>\n\nRequired. End date and time of the time period in which you want to search for the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, `2025-01-31 12:00:00`.\n\n</td></tr><tr><td>\n\nlocation\n\n</td><td>\n\nSys\\_id of the appointment's location.Table: Location \\[cmn\\_location\\]\n\nData type: String\n\nDefault: Returns all locations if not specified.\n\n</td></tr><tr><td>\n\nopened\\_for\n\n</td><td>\n\nRequired. Sys\\_id of the user for whom the appointment is being booked.Table: Contact \\[customer\\_contact\\]\n\nData type: String\n\n</td></tr><tr id=\"serviceTest-response-testMeasureDefinition.thresholdRule.consequence.validFor.startDateTime\"><td>\n\nstart\\_date\n\n</td><td>\n\nRequired. Start date and time of the time period in which you want to search for the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, `2025-01-31 09:00:00`.\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\navailableTimeSlot\n\n</td><td>\n\nList of appointment slots within the specified block of time requested.Data type: Array of Objects\n\n```\n'availableTimeSlot': [\n { \n  \"available\": Boolean,\n  \"end_date\": \"String\",\n  \"end_date_display\": \"String\",\n  \"end_dateUTC\": \"String\",\n  \"start_date\": \"String\",\n  \"start_date_display\": \"String\",\n  \"start_dateUTC\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\navailableTimeSlot.available\n\n</td><td>\n\nFlag that indicates whether the associated time slot is available.Possible values:\n\n-   true: Time slot is available.\n-   false: Time slot is unavailable.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\navailableTimeSlot.end\\_date\n\n</td><td>\n\nEnd date and time of the associated appointment. The time zone is based on the value in the **timeZone** parameter.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\navailableTimeSlot.end\\_date\\_display\n\n</td><td>\n\nDisplay end date and time of the associated appointment. The time zone is based on the value in the **timeZone** parameter.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\navailableTimeSlot.end\\_dateUTC\n\n</td><td>\n\nEnd date and time of the associated appointment.Data type: String\n\nFormat: UTC\n\n</td></tr><tr><td>\n\navailableTimeSlot.start\\_date\n\n</td><td>\n\nStart date and time of the associated appointment. Reflects the value of the **timeZone** parameter.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\navailableTimeSlot.start\\_date\\_display\n\n</td><td>\n\nDisplay start date and time of the associated appointment. Reflects the value of the **timeZone** parameter.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\navailableTimeSlot.start\\_dateUTC\n\n</td><td>\n\nStart date and time of the associated appointment.Data type: String\n\nFormat: UTC\n\n</td></tr><tr><td>\n\nhasMore\n\n</td><td>\n\nFlag that indicates whether there are more appointment slots to fetch after returning the limit. The limit is specified in the Appointment Booking property, sn\\_apptmnt\\_booking.max\\_appointments\\_returned \\(Default: 100\\). See [Appointment booking components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/field-service-management/appointment-booking-components.md) for more details about this property.Possible values:\n\n-   true: More appointment slots can be fetched.\n-   false: No more appointment slots are available.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nnoApptAvailable\n\n</td><td>\n\nFlag that indicates whether there are more appointment slots available for the specified date and time.Valid values:\n\n-   true: More appointment slots are available for the specified date and time.\n-   false: No more appointment slots are available for the specified date and time.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\nsearchResult\n\n</td><td>\n\nResults for appointment availability within the designated search time slot.Possible values:\n\n-   success\n-   fail\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nCompletion status of the search for available time slots. For example, done.Data type: String\n\n</td></tr><tr><td>\n\ntimeZone\n\n</td><td>\n\nTime zone used when booking or updating the specified appointment slot.Date type: String\n\nFormat: Country/city or area format, such as US/Eastern\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following code example shows how to call this endpoint.\n\n```\ncurl --location --request GET 'https://instance.service-now.com/api/sn_tmf_api/appointment/searchTimeSlot?\nstart_date=2024-07-10 09:00:00&end_date=2024-07-20 23:00:00&catalog_id=ada50a93f0220210f8776517d8c8e776&\nopened_for=51670151c35420105252716b7d40ddfe&location=f48b21850a0a0ba7004182b18099696d ' \\\n--user 'username':'password'\n```\n\nResult:\n\n```\n{\n  \"searchResult\": \"success\",\n  \"status\": \"done\",\n  \"availableTimeSlot\": [\n    {\n      \"start_date\": \"2024-07-10 09:00:00\",\n      \"end_date\": \"2024-07-10 12:00:00\",\n      \"start_date_display\": \"09:00\",\n      \"end_date_display\": \"12:00\",\n      \"start_dateUTC\": \"2024-07-10 16:00:00\",\n      \"end_dateUTC\": \"2024-07-10 19:00:00\",\n      \"available\": false\n    },\n    {\n      \"start_date\": \"2024-07-11 13:00:00\",\n      \"end_date\": \"2024-07-11 16:00:00\",\n      \"start_date_display\": \"13:00\",\n      \"end_date_display\": \"16:00\",\n      \"start_dateUTC\": \"2024-07-11 20:00:00\",\n      \"end_dateUTC\": \"2024-07-11 23:00:00\",\n      \"available\": true\n    },\n    {\n      \"start_date\": \"2024-07-12 09:00:00\",\n      \"end_date\": \"2024-07-12 12:00:00\",\n      \"start_date_display\": \"09:00\",\n      \"end_date_display\": \"12:00\",\n      \"start_dateUTC\": \"2024-07-12 16:00:00\",\n      \"end_dateUTC\": \"2024-07-12 19:00:00\",\n      \"available\": true\n    },\n    {\n      \"start_date\": \"2024-07-12 13:00:00\",\n      \"end_date\": \"2024-07-12 16:00:00\",\n      \"start_date_display\": \"13:00\",\n      \"end_date_display\": \"16:00\",\n      \"start_dateUTC\": \"2024-07-12 20:00:00\",\n      \"end_dateUTC\": \"2024-07-12 23:00:00\",\n      \"available\": true\n    },\n    {\n      \"start_date\": \"2024-07-19 13:00:00\",\n      \"end_date\": \"2024-07-19 16:00:00\",\n      \"start_date_display\": \"13:00\",\n      \"end_date_display\": \"16:00\",\n      \"start_dateUTC\": \"2024-07-19 20:00:00\",\n      \"end_dateUTC\": \"2024-07-19 23:00:00\",\n      \"available\": true\n    }\n  ],\n  \"hasMore\": false,\n  \"noApptAvailable\": false,\n  \"timeZone\": \"US/Arizona\"\n}\n```\n\n## Appointment Open - GET /api/sn\\_tmf\\_api/appointment/appointment/\\{id\\}\n\nRetrieves an appointment record associated with a specified ID.\n\n### URL format\n\nDefault URL: `/api/sn_tmf_api/appointment/appointment/{id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment to retrieve.Data type: String\n\nTable: Appointment booking \\[sn\\_apptmnt\\_booking\\_appointment\\_booking\\]\n\n</td></tr></tbody>\n</table><table id=\"id_g4x_4zc_tcc\" class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr id=\"query-row-category\"><td>\n\ncategory\n\n</td><td>\n\nFilter the appointment by category sys\\_id.Data type: String\n\nTable: Location \\[cmn\\_location\\]\n\nDefault: Returns all appointments if category sys\\_id is not provided.\n\n</td></tr><tr id=\"query-row-relatedEntity\"><td>\n\nrelatedEntity\n\n</td><td>\n\nDetails about the related entity associated with the work order.Data type: Object\n\n```\n\"relatedEntity\": {\n  \"id\": \"String\"\n}\n```\n\n</td></tr><tr id=\"query-row-relatedEntity.id\"><td>\n\nrelatedEntity.id\n\n</td><td>\n\nRequired. Sys\\_id of the related entity.Data type: String\n\nTable: workOrder \\[wm\\_order\\]\n\nDefault: Returns all if sys\\_id is not provided.\n\n</td></tr><tr id=\"query-row-relatedParty\"><td>\n\nrelatedParty\n\n</td><td>\n\nFilter the appointment by the sys\\_id of the related party associated with the appointment.Data type: Object\n\n```\n\"relatedParty\": {\n  \"id\": \"String\",\n  \"name\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **relatedParty** is not provided.\n\n</td></tr><tr id=\"query-row-relatedParty.id\"><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party.Data type: String\n\nTable: User \\[sys\\_user\\]\n\n</td></tr><tr id=\"query-row-relatedParty.name\"><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr id=\"query-row-relatedPlace\"><td>\n\nrelatedPlace\n\n</td><td>\n\nFilter the appointment by the place where the service or repair is scheduled to happen.Data type: Object\n\n```\n\"relatedPlace\": {\n  \"id\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **relatedPlace** is not provided.\n\n</td></tr><tr id=\"query-row-relatedPlace.id\"><td>\n\nrelatedPlace.id\n\n</td><td>\n\nSys\\_id of the related place.Data type: String\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr><tr id=\"query-row-validFor\"><td>\n\nvalidFor\n\n</td><td>\n\nFilter the appointment by a date range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\":\n{\n  \"endDateTime\": \"String\",\n  \"startDateTime\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **validFor** is not provided.\n\n</td></tr><tr id=\"query-row-validFor.endDateTime\"><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment. Only appointments with the specified end date and time are returned in the response.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr><tr id=\"query-row-validFor.startDateTime\"><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment. Only appointments with the specified start date and time are returned in the response. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|404|Not found. The requested item wasn't found.|\n\n### Response body parameters\n\n<table id=\"table_ybf_bwd_wcc\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncategory\n\n</td><td>\n\nSys\\_id of the record producer configured for the appointment booking service configuration.Data type: String\n\nStored in: Catalog Item  field of the Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table.\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate and time that the appointment was created.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nHyperlink to the appointment record. Use this link in another Appointment Open API request to reschedule or delete the appointment.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment.Data type: String\n\nStored in: Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate and time the appointment was last updated.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nDetails about the related entity of the appointment.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"role\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the related entity.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nRole description of the related entity. Possible value: work order\n\nData type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nList of contacts for the appointment. Each contact is an object in the array.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \" String\",\n  \"role\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of customer.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the customer contact associated with the work order.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the customer contact.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.role\n\n</td><td>\n\nRole of the customer contact.Possible values:\n\n-   customer: The contact has a customer role.\n-   technician: The contact has a technician role.\n\nData type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace\n\n</td><td>\n\nLocation details of the associated appointment.Data type: Object\n\n```\n\"relatedPlace\": {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nrelatedPlace.@referredType\n\n</td><td>\n\nGeographic address of the appointment. Possible value: GeographicLocation.\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.id\n\n</td><td>\n\nSys\\_id of the location. Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.name\n\n</td><td>\n\nName of the location related to the contact. For example, 100 South Charles Street, Baltimore, MD.Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.role\n\n</td><td>\n\nRole of the appointment location as an intervention address.Possible value: InterventionAddress\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nvalidFor\n\n</td><td>\n\nDate range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\": {\n \"endDateTime\": \"String\"\n \"startDateTime\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example returns appointment details according to the given appointment record ID.\n\n```\ncurl \"http://instance.servicenow.com/api/sn_tmf_api/appointment/appointment/201071ad4f80d210f8992fec52ce0ba9\" \\ \n--request GET\\ \n--user 'username':'password'\n```\n\nResponse body:\n\n```\n[\n  {\n    \"id\": \"201071ad4f80d210f8992fec52ce0ba9\",\n    \"href\": \"api/sn_tmf_api/appointment/appointment/201071ad4f80d210f8992fec52ce0ba9\",\n    \"validFor\": {\n      \"startDateTime\": \"2024-08-16 17:00:00\",\n      \"endDateTime\": \"2024-08-16 19:00:00\"\n    },\n    \"category\": \"4a34a64d4f4c1210f8992fec52ce0b63\",\n    \"relatedParty\": [\n      {\n        \"id\": \"eaf68911c35420105252716b7d40ddde\",\n        \"name\": \" null\",\n        \"role\": \"customer\",\n        \"@referredType\": \"Individual\"\n      }\n    ],\n    \"relatedPlace\": {\n      \"id\": \"25ab9c4d0a0a0bb300f7dabdc0ca7c1c\",\n      \"name\": \"100 South Charles Street, Baltimore,MD\",\n      \"role\": \"interventionAddress\",\n      \"@referredType\": \"Individual\"\n    },\n    \"relatedEntity\": [\n      {\n        \"id\": \"b440a5694f40d210f8992fec52ce0ba3\",\n        \"role\": \"work order\",\n        \"@referredType\": \"WorkOrder\"\n      }\n    ],\n    \"creationDate\": \"2024-08-16 00:39:22\",\n    \"lastUpdate\": \"2024-08-16 00:39:22\"\n  }\n]\n```\n\n## Appointment Open - GET /api/sn\\_tmf\\_api/appointment/appointment\n\nRetrieves a list of appointment records.\n\n### URL format\n\nDefault URL: `/api/sn_tmf_api/appointment/appointment`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table id=\"id_akz_31d_tcc\" class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr id=\"query-row-category\"><td>\n\ncategory\n\n</td><td>\n\nFilter the appointment by category sys\\_id.Data type: String\n\nTable: Location \\[cmn\\_location\\]\n\nDefault: Returns all appointments if category sys\\_id is not provided.\n\n</td></tr><tr id=\"query-row-relatedEntity\"><td>\n\nrelatedEntity\n\n</td><td>\n\nDetails about the related entity associated with the work order.Data type: Object\n\n```\n\"relatedEntity\": {\n  \"id\": \"String\"\n}\n```\n\n</td></tr><tr id=\"query-row-relatedEntity.id\"><td>\n\nrelatedEntity.id\n\n</td><td>\n\nRequired. Sys\\_id of the related entity.Data type: String\n\nTable: workOrder \\[wm\\_order\\]\n\nDefault: Returns all if sys\\_id is not provided.\n\n</td></tr><tr id=\"query-row-relatedParty\"><td>\n\nrelatedParty\n\n</td><td>\n\nFilter the appointment by the sys\\_id of the related party associated with the appointment.Data type: Object\n\n```\n\"relatedParty\": {\n  \"id\": \"String\",\n  \"name\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **relatedParty** is not provided.\n\n</td></tr><tr id=\"query-row-relatedParty.id\"><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the related party.Data type: String\n\nTable: User \\[sys\\_user\\]\n\n</td></tr><tr id=\"query-row-relatedParty.name\"><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the related party.Data type: String\n\n</td></tr><tr id=\"query-row-relatedPlace\"><td>\n\nrelatedPlace\n\n</td><td>\n\nFilter the appointment by the place where the service or repair is scheduled to happen.Data type: Object\n\n```\n\"relatedPlace\": {\n  \"id\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **relatedPlace** is not provided.\n\n</td></tr><tr id=\"query-row-relatedPlace.id\"><td>\n\nrelatedPlace.id\n\n</td><td>\n\nSys\\_id of the related place.Data type: String\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr><tr id=\"query-row-validFor\"><td>\n\nvalidFor\n\n</td><td>\n\nFilter the appointment by a date range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\":\n{\n  \"endDateTime\": \"String\",\n  \"startDateTime\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **validFor** is not provided.\n\n</td></tr><tr id=\"query-row-validFor.endDateTime\"><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment. Only appointments with the specified end date and time are returned in the response.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr><tr id=\"query-row-validFor.startDateTime\"><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment. Only appointments with the specified start date and time are returned in the response. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|404|Not found. The requested item wasn't found.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_g3p_tyd_wcc\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncategory\n\n</td><td>\n\nSys\\_id of the record producer configured for the appointment booking service configuration.Data type: String\n\nStored in: Catalog Item  field of the Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table.\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate and time that the appointment was created.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nHyperlink to the appointment record. Use this link in another Appointment Open API request to reschedule or delete the appointment.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment.Data type: String\n\nStored in: Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate and time the appointment was last updated.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nDetails about the related entity of the appointment.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"role\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the related entity.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nRole description of the related entity. Possible value: work order\n\nData type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nList of contacts for the appointment. Each contact is an object in the array.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \" String\",\n  \"role\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of customer.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the customer contact associated with the work order.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the customer contact.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.role\n\n</td><td>\n\nRole of the customer contact.Possible values:\n\n-   customer: The contact has a customer role.\n-   technician: The contact has a technician role.\n\nData type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace\n\n</td><td>\n\nLocation details of the associated appointment.Data type: Object\n\n```\n\"relatedPlace\": {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nrelatedPlace.@referredType\n\n</td><td>\n\nGeographic address of the appointment. Possible value: GeographicLocation.\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.id\n\n</td><td>\n\nSys\\_id of the location. Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.name\n\n</td><td>\n\nName of the location related to the contact. For example, 100 South Charles Street, Baltimore, MD.Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.role\n\n</td><td>\n\nRole of the appointment location as an intervention address.Possible value: InterventionAddress\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nvalidFor\n\n</td><td>\n\nDate range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\": {\n \"endDateTime\": \"String\"\n \"startDateTime\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to return a list of appointments using the GET appointment method.\n\n```\ncurl \"http://instance.servicenow.com/api/sn_tmf_api/appointment/appointment\" \\ \n--request GET\\ \n--user 'username':'password' \n```\n\nThe response body contains the details of two different appointments configured in the appointment booking service configuration:\n\n```\n[\n  {\n    \"id\": \"201071ad4f80d210f8992fec52ce0ba9\",\n    \"href\": \"api/sn_tmf_api/appointment/appointment/201071ad4f80d210f8992fec52ce0ba9\",\n    \"validFor\": {\n      \"startDateTime\": \"2024-08-16 17:00:00\",\n      \"endDateTime\": \"2024-08-16 19:00:00\"\n    },\n    \"category\": \"4a34a64d4f4c1210f8992fec52ce0b63\",\n    \"relatedParty\": [\n      {\n        \"id\": \"eaf68911c35420105252716b7d40ddde\",\n        \"name\": \" null\",\n        \"role\": \"customer\",\n        \"@referredType\": \"Individual\"\n      }\n    ],\n    \"relatedPlace\": {\n      \"id\": \"25ab9c4d0a0a0bb300f7dabdc0ca7c1c\",\n      \"name\": \"100 South Charles Street, Baltimore,MD\",\n      \"role\": \"interventionAddress\",\n      \"@referredType\": \"Individual\"\n    },\n    \"relatedEntity\": [\n      {\n        \"id\": \"b440a5694f40d210f8992fec52ce0ba3\",\n        \"role\": \"work order\",\n        \"@referredType\": \"WorkOrder\"\n      }\n    ],\n    \"creationDate\": \"2024-08-16 00:39:22\",\n    \"lastUpdate\": \"2024-08-16 00:39:22\"\n  },\n  {\n    \"id\": \"25c012c07f5c5610f8994fa63c866523\",\n    \"href\": \"api/sn_tmf_api/appointment/appointment/25c012c07f5c5610f8994fa63c866523\",\n    \"validFor\": {\n      \"startDateTime\": \"2024-08-26 17:00:00\",\n      \"endDateTime\": \"2024-08-26 19:00:00\"\n    },\n    \"category\": \"4a34a64d4f4c1210f8992fec52ce0b63\",\n    \"relatedParty\": [\n      {\n        \"id\": \"eaf68911c35420105252716b7d40ddde\",\n        \"name\": \" null\",\n        \"role\": \"customer\",\n        \"@referredType\": \"Individual\"\n      }\n    ],\n    \"relatedPlace\": {\n      \"id\": \"f48b21850a0a0ba7004182b18099696d\",\n      \"name\": \"11251 Rancho Carmel Drive, San Diego,CA\",\n      \"role\": \"interventionAddress\",\n      \"@referredType\": \"Individual\"\n    },\n    \"relatedEntity\": [\n      {\n        \"id\": \"c0b09a047f109610f8994fa63c8665b4\",\n        \"role\": \"work order\",\n        \"@referredType\": \"WorkOrder\"\n      }\n    ],\n    \"creationDate\": \"2024-08-23 22:18:43\",\n    \"lastUpdate\": \"2024-08-23 22:18:43\"\n  }\n]\n```\n\n## Appointment Open - PATCH /api/sn\\_tmf\\_api/appointment/appointment/\\{id\\}\n\nReschedule appointments with a given ID for a  work order.\n\n### URL format\n\nDefault URL: `PATCH /api/sn_tmf_api/appointment/appointment/{id}`\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment to reschedule. Data type: String\n\nTable: Appointment booking \\[sn\\_apptmnt\\_booking\\_appointment\\_booking\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nnote\n\n</td><td>\n\nIf canceling the appointment, you can add work notes here. Updates the work notes of the work order and the message of the appointment.Data type: Array of Objects\n\n```\n\"note\": [ \n {\n  \"author\": \"String\", \n  \"date\": \"String\", \n  \"text\": \"String\"\n }\n]\n```\n\nStored in: Appointment Booking \\[sn\\_apptmnt\\_booking\\_appointment\\_booking\\] table\n\n</td></tr><tr><td>\n\nnote.author\n\n</td><td>\n\nName of the person who writing the note.Data type: String\n\n</td></tr><tr><td>\n\nnote.date\n\n</td><td>\n\nDate and time that the note was published. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2018-02-04T11:00:18.071Z.\n\n</td></tr><tr><td>\n\nnote.text\n\n</td><td>\n\nDescriptive text about the work order that is attached to the appointment. For example, updates on the work order's progress.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td>\n\nStatus of the appointment.Valid values:\n\n-   cancelled: The appointment reschedule is cancelled.\n-   completed: The rescheduled appointment is completed.\n-   confirmed: The appointment reschedule is accepted and booked.\n-   new: The appointment rescheduling request was recently created.\n-   pending: The appointment reschedule is pending.\n-   ready: The appointment reschedule is requested.\n\nData type: String\n\n</td></tr><tr><td>\n\nvalidFor\n\n</td><td>\n\nFilter the appointment by a date range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\":\n{\n  \"endDateTime\": \"String\",\n  \"startDateTime\": \"String\"\n}\n```\n\nDefault: Returns all appointments if **validFor** is not provided.\n\n</td></tr><tr><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment. Only appointments with the specified end date and time are returned in the response.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr><tr><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment. Only appointments with the specified start date and time are returned in the response. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\nTable: Location \\[cmn\\_location\\]\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate and time that the appointment was created.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nUnique reference link of the appointment. You can use this link in another request to get an appointment.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment that was rescheduled.Data type: String\n\nStored in: Appointment booking \\[sn\\_apptmnt\\_booking\\_appointment\\_booking\\] table\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate and time the appointment was last updated.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nreason\n\n</td><td>\n\nPurpose for updating the appointment.Possible values:\n\n-   \"Appointment rescheduled.\": The PATCH method was used to reschedule the appointment.\n-   \"The appointment \\(id\\) is successfully cancelled.\": The PATCH method was used to cancel the appointment.\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nCustomer details of the associated appointment.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n  {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the customer contact.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the customer contact.Data type: String\n\n</td></tr><tr><td>\n\nrelatedPlace.@referredType\n\n</td><td>\n\nType of customer.Data type: String\n\nOnly possible value: Individual\n\n</td></tr><tr><td>\n\nrelatedParty.role\n\n</td><td>\n\nRole of the contact.Data type: String\n\nOnly possible value: Contact\n\n</td></tr><tr><td>\n\nsuccess\n\n</td><td>\n\nFlag that indicates whether the request was successful.Possible values:\n\n-   true: The appointment was successfully rescheduled.\n-   false: The appointment couldn't be rescheduled.\n\nData type: Boolean\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example demonstrates how to use a PATCH method to reschedule an appointment with a given ID.\n\n```\ncurl -X POST 'https://instance.service-now.com/api/sn_tmf_api/appointment/appointment/68cc0a5a9314521060320dd548373cbd ' \\ \n-H \"Accept: application/json\" \\ \n-H \"Content-Type: application/json\" \\ \n-u \"username\":\"password\" \\ \n-data {\n  \"validFor\": { \n      \"startDateTime\": \"2024-07-30 00:0:00\", \n      \"endDateTime\": \"2024-08-30 00:00:00\" \n              }\n  \"note\": {\n      \"date\": \"85388c25b71011104eed4643ae11a993\",\n      \"author\": \"Sarah Johnson\",\n      \"text\": \"customer\"\n    }\n  \"state\": \"active\"\n   }\n  ]\n}\n```\n\nThe response body shows a success message that the appointment was rescheduled.\n\n```\n{\n  \"relatedParty\": [\n    {\n      \"id\": \"85388c25b71011104eed4643ae11a993\",\n      \"name\": \"Sarah Johnson\",\n      \"role\": \"customer\",\n      \"@referredType\": \"Individual\"\n    }\n  ],\n  \"success\": true,\n  \"reason\": \"Appointment rescheduled!\",\n  \"id\": \"68cc0a5a9314521060320dd548373cbd\",\n  \"href\": \"api/sn_tmf_api/appointment/appointment/68cc0a5a9314521060320dd548373cbd\",\n  \"creationDate\": \"2024-08-30 20:56:54\",\n  \"lastUpdate\": \"2024-08-30 20:56:54\"\n}\n```\n\n## Appointment Open - POST /api/sn\\_tmf\\_api/appointment/appointment\n\nEnables you to book appointments for a work order.\n\n### URL format\n\n`/api/sn_tmf_api/appointment/appointment`\n\n### Supported request parameters\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncategory\n\n</td><td>\n\nRequired. Sys\\_id of the record producer configured for the appointment booking service configuration. Data type: String\n\nTable: In the Catalog Item field of the Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table.\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nRequired. List of impacted work orders to associate with the appointment.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n  {\n    \"@referredType\": \"String\"\n    \"id\": \"String\",\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nRequired. Type of item or service. Only valid value: WorkOrder\n\nData type: String\n\nTable: Work Order \\[wm\\_order\\]\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nRequired. Sys\\_id of the related entity.Data type: String\n\nTable: workOrder \\[wm\\_order\\]\n\nDefault: Returns all if sys\\_id is not provided.\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nRequired. Role description of the related entity. Only valid value: work order\n\nData type: String\n\nTable: Work Order \\[wm\\_order\\]\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nRequired. List of contacts for the appointment. Each contact is an object in the array. The request must list at least one item which contains customer account information.Data type: Array of Objects\n\n```\n\"relatedParty\": [ \n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of customer. Only valid value: Individual\n\nData type: String\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nRequired. Sys\\_id or external\\_id of the contact associated with the work order. Data type: String\n\nTable: Contact \\[customer\\_contact\\]\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the contact.Data type: String\n\nTable: Contact \\[customer\\_contact\\]\n\n</td></tr><tr><td>\n\nrelatedParty.role\n\n</td><td>\n\nRequired. Role of the contact.Possible values:\n\n-   customer: The contact has a customer role.\n-   technician: The contact has a technician role.\n\nData type: String\n\nTable: Contact \\[customer\\_contact\\]\n\n</td></tr><tr><td>\n\nrelatedPlace\n\n</td><td>\n\nRequired. List of the locations related to the appointment.Data type: Array of Objects\n\n```\n\"relatedPlace\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedPlace.@referredType\n\n</td><td>\n\nRequired. Type of location. For example, City.Data type: String\n\nTable: Locations \\[cmn\\_location\\]\n\n</td></tr><tr><td>\n\nrelatedPlace.id\n\n</td><td>\n\nRequired. Sys\\_id of the related location.Data type: String\n\nTable: Locations \\[cmn\\_location\\]\n\n</td></tr><tr><td>\n\nrelatedPlace.name\n\n</td><td>\n\nName of the location related to the contact. For example, 251 Reddy St, Darwin, CA 93522.Data type: String\n\nTable: Locations \\[cmn\\_location\\]\n\n</td></tr><tr><td>\n\nrelatedPlace.role\n\n</td><td>\n\nRequired. Description of the location role. For example, work order.Data type: String\n\n</td></tr><tr><td>\n\ntimeZone\n\n</td><td>\n\nRequired. Time zone to use when booking the specified appointment slot.Date type: String\n\nFormat: Country/city or area format, such as US/Eastern\n\n</td></tr><tr id=\"serviceTest-response-testMeasureDefinition.thresholdRule.consequence.validFor\"><td>\n\nvalidFor\n\n</td><td>\n\nRequired. Date range the appointment is valid for.Data type: Object\n\n```\n\"validFor\": {\n  \"endDateTime\": \"String\",\n  \"startDateTime\": \"String\"\n}\n```\n\n</td></tr><tr id=\"serviceTest-response-testMeasureDefinition.thresholdRule.consequence.validFor.endDateTime\"><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nRequired. End date and time of the time slot. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr id=\"serviceTest-response-testMeasureDefinition.thresholdRule.consequence.validFor.startDateTime\"><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nRequired. Start date and time of the time slot. Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Accept|Data format of the response body. Only supports **application/json**.|\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Only supports **application/json**.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ncategory\n\n</td><td>\n\nSys\\_id of the record producer configured for the appointment booking service configuration. Data type: String\n\nStored in: Catalog Item field of the Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table.\n\n</td></tr><tr><td>\n\ncreationDate\n\n</td><td>\n\nDate and time that the appointment was created.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nhref\n\n</td><td>\n\nHyperlink to the appointment record. Use this link in another Appointment Open API request to reschedule or delete the appointment.Data type: String\n\n</td></tr><tr><td>\n\nid\n\n</td><td>\n\nSys\\_id of the appointment.Data type: String\n\nStored in: Appointment Booking Service Configuration \\[sn\\_apptmnt\\_booking\\_service\\_config\\] table\n\n</td></tr><tr><td>\n\nlastUpdate\n\n</td><td>\n\nDate and time the appointment was last updated.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nrelatedEntity\n\n</td><td>\n\nDetails about the related entity of the appointment.Data type: Array of Objects\n\n```\n\"relatedEntity\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"role\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedEntity.@referredType\n\n</td><td>\n\nType of item or service.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.id\n\n</td><td>\n\nSys\\_id of the related entity.Data type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedEntity.role\n\n</td><td>\n\nRole description of the related entity. Possible value: work order\n\nData type: String\n\nStored in: workOrder \\[wm\\_order\\] table\n\n</td></tr><tr><td>\n\nrelatedParty\n\n</td><td>\n\nList of contacts for the appointment. Each contact is an object in the array.Data type: Array of Objects\n\n```\n\"relatedParty\": [\n {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \" String\",\n  \"role\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nrelatedParty.@referredType\n\n</td><td>\n\nType of customer.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.id\n\n</td><td>\n\nSys\\_id of the customer contact associated with the work order.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.name\n\n</td><td>\n\nName of the customer contact.Data type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedParty.role\n\n</td><td>\n\nRole of the customer contact.Possible values:\n\n-   customer: The contact has a customer role.\n-   technician: The contact has a technician role.\n\nData type: String\n\nStored in: Contact \\[customer\\_contact\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace\n\n</td><td>\n\nLocation details of the associated appointment.Data type: Object\n\n```\n\"relatedPlace\": {\n  \"@referredType\": \"String\",\n  \"id\": \"String\",\n  \"name\": \"String\",\n  \"role\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nrelatedPlace.@referredType\n\n</td><td>\n\nGeographic address of the appointment. Possible value: GeographicLocation.\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.id\n\n</td><td>\n\nSys\\_id of the location. Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.name\n\n</td><td>\n\nName of the location related to the contact. For example, 100 South Charles Street, Baltimore, MD.Data type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nrelatedPlace.role\n\n</td><td>\n\nRole of the appointment location as an intervention address.Possible value: InterventionAddress\n\nData type: String\n\nStored in: Location \\[cmn\\_location\\] table\n\n</td></tr><tr><td>\n\nsuccess\n\n</td><td>\n\nFlag that indicates whether the request was successful.Possible values:\n\n-   true: Request succeeded.\n-   false: Request failed.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\ntimeZone\n\n</td><td>\n\nTime zone used when booking or updating the specified appointment slot.Date type: String\n\nFormat: Country/city or area format, such as US/Eastern\n\n</td></tr><tr><td>\n\nvalidFor\n\n</td><td>\n\nDate range that the appointment is valid for.Data type: Object\n\n```\n\"validFor\": {\n \"endDateTime\": \"String\"\n \"startDateTime\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nvalidFor.endDateTime\n\n</td><td>\n\nEnd date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr><tr><td>\n\nvalidFor.startDateTime\n\n</td><td>\n\nStart date and time of the appointment.Data type: String\n\nFormat: YYYY-MM-DD 00:00:00. For example, 2025-01-31 09:35:43.\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to create a new appointment booking.\n\n```\ncurl \"https://instance.servicenow.com/api/sn_tmf_api/appointment/appointment\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\n  \\\"validFor\\\": {\n    \\\"startDateTime\\\": \\\"2024-08-19 09:00:00\\\",\n    \\\"endDateTime\\\": \\\"2024-08-19 11:00:00\\\"\n  },\n  \\\"category\\\": \\\"e4c1116b3b810300ce8a4d72f3efc40f\\\",\n  \\\"relatedParty\\\": [\n    {\n      \\\"id\\\": \\\"eaf68911c35420105252716b7d40ddde\\\",\n      \\\"name\\\": \\\"Sally Thomas\\\",\n      \\\"role\\\": \\\"customer\\\",\n      \\\"@referredType\\\": \\\"Individual\\\"\n    }\n  ],\n  \\\"relatedPlace\\\": {\n    \\\"id\\\": \\\"25ab9c4d0a0a0bb300f7dabdc0ca7c1c\\\",\n    \\\"name\\\": \\\"100 South Charles Street, Baltimore,MD\\\",\n    \\\"role\\\": \\\"interventionAddress\\\",\n    \\\"@referredType\\\": \\\"GeographicAddress\\\"\n  },\n  \\\"relatedEntity\\\": [\n    {\n      \\\"id\\\": \\\"48dbfbf9201f0250f877303e8a020dcd\\\",\n      \\\"role\\\": \\\"work order\\\",\n      \\\"@referredType\\\": \\\"WorkOrder\\\"\n    }\n  ],\n  \\\"timeZone\\\": \\\"US/Arizona\\\"\n}\" \\\n--user 'username':'password'\n```\n\nResponse:\n\n```\n{\n  \"validFor\": {\n    \"startDateTime\": \"2024-07-19 09:00:00\",\n    \"endDateTime\": \"2024-07-19 11:00:00\"\n  },\n  \"category\": \"e4c1116b3b810300ce8a4d72f3efc40f\",\n  \"relatedParty\": [\n    {\n      \"id\": \"eaf68911c35420105252716b7d40ddde\",\n      \"name\": \"Sally Thomas\",\n      \"role\": \"customer\",\n      \"@referredType\": \"Individual\"\n    }\n  ],\n  \"relatedPlace\": {\n    \"id\": \"25ab9c4d0a0a0bb300f7dabdc0ca7c1c\",\n    \"name\": \"100 South Charles Street, Baltimore,MD\",\n    \"role\": \"interventionAddress\",\n    \"@referredType\": \"GeographicAddress\"\n  },\n  \"relatedEntity\": [\n    {\n      \"id\": \"48dbfbf9201f0250f877303e8a020dcd\",\n      \"role\": \"work order\",\n      \"@referredType\": \"WorkOrder\"\n    }\n  ],\n  \"timeZone\": \"US/Arizona\",\n  \"success\": true,\n  \"id\": \"feacb7f9201f0250f877303e8a020d38\",\n  \"href\": \"api/sn_tmf_api/appointment/appointment/feacb7f9201f0250f877303e8a020d38\",\n  \"creationDate\": \"2024-07-10 22:45:01\",\n  \"lastUpdate\": \"2024-07-10 22:45:01\"\n}\n```\n\n"}}