Create a New Customer
The POST /api/v1/customer endpoint allows you to create a new customer in the app.haro.co.il system.
Endpoint
POST http://localhost:8080/api/v1/customer
Headers
-
x-api-key: (Required) Your unique API token. To obtain an API token, send an email request to info@haro.co.il.
-
Content-Type: application/json
-
Accept: application/json
Request Body
The request must include the following fields in JSON format:
-
Name: (String, Required) The customer's full name.
-
Phone: (String, Required) The customer's phone number, including the country code (e.g., +972 for Israel).
-
Notes: (String, Optional) Additional information or notes about the customer.
Example Request
POST http://localhost:8080/api/v1/customer
Headers: x-api-key: {API_KEY}
Content-Type: application/json
Accept: application/json
Body: { "Name": "test name", "Phone": "+972505249666", "Notes": "test notes" }
Response
-
201 Created: The customer was successfully created.
-
400 Bad Request: The request body is invalid or missing required fields.
-
401 Unauthorized: Invalid or missing x-api-key.
-
500 Internal Server Error: An error occurred on the server.
Notes
-
Replace localhost:8080 with the production base URL of the app.haro.co.il system.
-
Always keep your API token confidential.