Overview
Returns acontactId for use when creating bookings. If a contact with the given phone number already exists, it is returned. Otherwise, a new contact is created automatically.
Call this endpoint before POST /partners/bookings.
Endpoint
Authentication
Requires a valid API Key with thepartner_contacts_read permission.
Request Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your partner API key |
Content-Type | Yes | application/json |
Request Body
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Saudi phone number in international format (e.g. +966500000000). No spaces. |
name | string | Yes | Customer full name. Used when creating a new contact. |
utmSource | string | No | Tracking source tag. Defaults to PARTNER. |
Example Request
Success Response
HTTP Status:200 OK
Existing contact:
Response Fields
| Field | Type | Description |
|---|---|---|
id | UUID | The contactId to pass when creating a booking |
name | string | Contact name |
phone | string | Normalized phone number |
isNewContact | boolean | true if a new contact was created; false if an existing one was returned |
Error Responses
| HTTP Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid phone format or missing required fields |
401 | UNAUTHORIZED | Invalid or missing API key |
403 | FORBIDDEN | Missing partner_contacts_read permission |
Notes
- Store the returned
idascontactIdin your booking request. - Phone numbers are normalized server-side — always use the international
+966format. - You still need a separate
addressIdfor the service location when creating a booking.
Related Endpoints
GET /partners/contacts/:contactId— Retrieve a contact by IDPOST /partners/bookings— Create a booking using the returnedcontactId