Skip to content

Commit

Permalink
Correct the example service category requests
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Jul 22, 2024
1 parent e89686c commit 37374a2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ Get the data of a customer with ID 34:
curl http://ea-installation/index.php/api/v1/customers/34 --user username:password
```

Update the name of a category with ID 23:
Update the name of a service category with ID 23:

```
curl -H 'Content-Type: application/json' -X PUT -d '{"name": "New Name!"}' http://ea-installation/index.php/api/v1/categories/23 --user username:password
curl -H 'Content-Type: application/json' -X PUT -d '{"name": "New Name!"}' http://ea-installation/index.php/api/v1/service_categories/23 --user username:password
```

Delete the service with ID 15:
Expand Down Expand Up @@ -225,7 +225,7 @@ You can also try the GET requests with your browser by navigating to the respect
"description": "This is a test service.",
"availabilitiesType": "flexible",
"attendantsNumber": 1,
"categoryId": null
"serviceCategoryId": null
}
```

Expand All @@ -236,7 +236,7 @@ You can also try the GET requests with your browser by navigating to the respect

* The `availabilitiesType` must be either `flexible` or `fixed`.

### Categories
### Service Categories

**Resource JSON**

Expand All @@ -248,10 +248,10 @@ You can also try the GET requests with your browser by navigating to the respect
}
```

- `GET /api/v1/categories[/:id]` Get all the categories or a specific one by providing the ID in the URI.
- `POST /api/v1/categories` Provide the new category JSON in the request body to insert a new record.
- `PUT /api/v1/categories/:id` Provide the updated category JSON in the request body to update an existing record. The ID in the URI is required.
- `DELETE /api/v1/categories/:id` Remove an existing category record.
- `GET /api/v1/service_categories[/:id]` Get all the service categories or a specific one by providing the ID in the URI.
- `POST /api/v1/service_categories` Provide the new service category JSON in the request body to insert a new record.
- `PUT /api/v1/service_categories/:id` Provide the updated service category JSON in the request body to update an existing record. The ID in the URI is required.
- `DELETE /api/v1/service_categories/:id` Remove an existing service category record.

### Admins

Expand Down

0 comments on commit 37374a2

Please sign in to comment.