82 lines
1.9 KiB
Markdown
82 lines
1.9 KiB
Markdown
# PATCH /integrations/parts-management/provision/:id
|
|
|
|
Update (patch) select fields for a parts management bodyshop. Only available for shops that have an
|
|
`external_shop_id` (i.e., are provisioned for parts management).
|
|
|
|
## Endpoint
|
|
|
|
```
|
|
PATCH /integrations/parts-management/provision/:id
|
|
```
|
|
|
|
- `:id` is the UUID of the bodyshop to update.
|
|
|
|
## Request Headers
|
|
|
|
- `Authorization`: (if required by your integration middleware)
|
|
- `Content-Type: application/json`
|
|
|
|
## Request Body
|
|
|
|
Send a JSON object with one or more of the following fields to update:
|
|
|
|
- `shopname` (string)
|
|
- `address1` (string)
|
|
- `address2` (string, optional)
|
|
- `city` (string)
|
|
- `state` (string)
|
|
- `zip_post` (string)
|
|
- `country` (string)
|
|
- `email` (string, shop's email, not user email)
|
|
- `timezone` (string)
|
|
- `phone` (string)
|
|
- `logo_img_path` (string)
|
|
|
|
Any fields not included in the request body will remain unchanged.
|
|
|
|
## Example Request
|
|
|
|
```
|
|
PATCH /integrations/parts-management/provision/123e4567-e89b-12d3-a456-426614174000
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"shopname": "New Shop Name",
|
|
"address1": "123 Main St",
|
|
"city": "Springfield",
|
|
"state": "IL",
|
|
"zip_post": "62704",
|
|
"country": "USA",
|
|
"email": "shop@example.com",
|
|
"timezone": "America/Chicago",
|
|
"phone": "555-123-4567",
|
|
"logo_img_path": "https://example.com/logo.png"
|
|
}
|
|
```
|
|
|
|
## Success Response
|
|
|
|
- **200 OK**
|
|
- Returns the updated shop object with the patched fields.
|
|
|
|
```
|
|
{
|
|
"id": "123e4567-e89b-12d3-a456-426614174000",
|
|
"shopname": "New Shop Name",
|
|
...
|
|
}
|
|
```
|
|
|
|
## Error Responses
|
|
|
|
- **400 Bad Request**: No valid fields provided, or shop does not have an `external_shop_id`.
|
|
- **404 Not Found**: No shop found with the given ID.
|
|
- **500 Internal Server Error**: Unexpected error.
|
|
|
|
## Notes
|
|
|
|
- Only shops with an `external_shop_id` can be patched via this route.
|
|
- Fields not listed above will be ignored if included in the request body.
|
|
- The route is protected by the same middleware as other parts management endpoints.
|
|
|