SOP-09:更新診所資訊

API SOP

修改既有診所的詳細資料,並可選擇性新增圖片。

3 個節點 · 2 條連接medirank
apisopmedirankclinics
ex-sop-09-update-clinic.osop.yaml
# 原始:SOP-09: 修改診所資料
osop_version: '1.0'
id: sop-09-update-clinic
name: "SOP-09:更新診所資訊"
description: "修改既有診所的詳細資料,並可選擇性新增圖片。"
version: 1.0.0
tags:
- api
- sop
- medirank
- clinics
nodes:
- id: step_1
  type: api
  subtype: rest
  name: GET /clinics/{clinic_id}
  description: Fetch current clinic data to confirm it exists.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /clinics/{clinic_id}
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: step_2
  type: api
  subtype: rest
  name: PUT /clinics/{clinic_id}
  description: Update clinic fields. Only changed fields required.
  runtime:
    method: PUT
    url: https://medi-rank.com/api/v1
    endpoint: /clinics/{clinic_id}
    headers:
      Authorization: Bearer ${secrets.TOKEN}
    body:
      name: New Name
      phone: 02-99999999
- id: step_3
  type: api
  subtype: rest
  name: POST /clinics/{clinic_id}/images
  description: Optionally add more clinic photos.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /clinics/{clinic_id}/images
    headers:
      Authorization: Bearer ${secrets.TOKEN}
    content_type: multipart/form-data
    body:
      images[]: (files)
edges:
- from: step_1
  to: step_2
  mode: sequential
- from: step_2
  to: step_3
  mode: conditional
  when: additional_images_needed