

操作ガイド
ここでは、イベントに関連するAPIエンドポイントをご覧いただけます。
すべてのAPIエンドポイントと、リクエストおよびレスポンスの例は、こちらからダウンロードできるAmelia API Postmanコレクションで確認できます。
APIエンドポイントの使用には、一定のコーディングスキルが必要であり、プラグインで提供されるサポートには含まれていません。
読みたいところをタップ
すべてのAmeliaエンドポイントは、Ameliaという名前のヘッダープロパティを使用したAPIキー認証を採用しています。
Amelia APIのパスは以下で始まります:{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
イベントを作成します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/events
必須プロパティ
以下のプロパティは必須です。
| キー | タイプ | 説明 |
name | string | イベントの名前。 |
periods | array | イベントの期間の配列。期間オブジェクトのフィールド:periodStart(期間開始)とperiodEnd(期間終了)。 |
maxCapacity | integer | イベントの最大人数。 |
price | double | イベントの価格。 |
オプションのプロパティ
以下のプロパティはオプションです。
| キー | タイプ | 説明 |
show | boolean | イベントがお客様側に表示されるかどうか。デフォルトはfalseです。 |
parentId | integer | 繰り返しイベントの場合の、親/最初のイベントのID。 |
bookingOpens | string | イベントの予約受付開始日時。デフォルトでは作成後に開始されます。形式:YYYY-MM-DD HH:mm:ss |
bookingCloses | string | イベントの予約受付終了日時。デフォルトではイベント開始後に終了します。形式:YYYY-MM-DD HH:mm:ss |
bookingOpensRec | string | 繰り返しイベントの予約受付開始日時が最初のイベントと同じか、開始日と受付開始日の差に基づいて計算されるか。使用可能な値:same(同じ)、calculate(計算)。デフォルト値はsameです。 |
bookingClosesRec | string | 繰り返しイベントの予約受付終了日時が最初のイベントと同じか、開始日と受付終了日の差に基づいて計算されるか。使用可能な値:same(同じ)、calculate(計算)。デフォルト値はsameです。 |
recurring | object | イベントの繰り返し設定を定義するオブジェクト。 |
bringingAnyone | boolean | お客様が追加の人物を同伴できるかどうか。デフォルトはfalseです。 |
bookMultipleTimes | boolean | 同じお客様が複数回予約できるかどうか。デフォルトはfalseです。 |
maxExtraPeople | integer | お客様が同伴できる追加の最大人数。 |
tags | array | イベントのタグオブジェクトの配列。タグオブジェクトはnameプロパティを持ちます。 |
providers | array | スタッフとして機能するスタッフIDを含むオブジェクトの配列。 |
description | string | イベントの説明。 |
gallery | array | ギャラリー用の画像パスの配列。 |
color | string | 色のHEX文字列。 |
locationId | integer | 場所ID。 |
customLocation | string | イベントのカスタム場所。 |
settings | string | イベント固有の設定を表すJSON形式の文字列。デフォルトでは基本設定が使用されます。 |
translations | string | イベント名と説明の翻訳を表すJSON形式の文字列。 |
depositPayment | string | 前払金のタイプ。使用可能な値:disabled(無効)、fixed(指定額)、percentage(パーセンテージ)。 |
deposit | integer | 前払金の金額。 |
depositPerPerson | boolean | 前払金が人数によって乗算されるかどうか。デフォルトはfalseです。 |
fullPayment | boolean | お客様が予約時に全額を支払うオプションを持つかどうか。デフォルトはfalseです。 |
customPricing | boolean | カスタム価格設定(チケット)が有効かどうか。デフォルトはfalseです。 |
organizerId | integer | 主催者であるスタッフのID。 |
closeAfterMin | integer | 設定された最小人数に達した場合にイベントを締め切る。 |
closeAfterMinBookings | boolean | closeAfterMinが予約に適用されるか、各予約の人数に適用されるか。デフォルトはfalseで、人数に適用されます。 |
customTickets | array | チケットの配列。 |
maxCustomCapacity | integer | すべてのチケットタイプの合計最大定員。 |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{ "parentId": null, "name": "Amelia Event", "periods": [ { "periodStart": "2023-10-10 14:00:00", "periodEnd": "2023-10-20 22:30:00" } ], "bookingOpens": "2023-10-05 14:00:00", "bookingCloses": "2023-10-09 14:00:00", "bookingOpensRec": "same", "bookingClosesRec": "same", "recurring": { "monthlyRepeat": "each", "monthDate": null, "monthlyOnRepeat": null, "monthlyOnDay": null, "cycleInterval": 1, "cycle": "weekly", "order": null, "until": "2023-10-22 00:00:00" }, "bringingAnyone": true, "bookMultipleTimes": true, "maxCapacity": 100, "maxExtraPeople": null, "price": 100, "tags": [ { "name": "tag1" } ], "providers": [ { "id": 1 }, { "id": 3 } ], "description": "", "gallery": [], "color": "#1788FB", "show": true, "locationId": 2, "customLocation": null, "applyGlobally": true, "settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}", "translations": null, "deposit": 10, "depositPayment": "fixed", "depositPerPerson": 1, "fullPayment": true, "customPricing": false, "organizerId": 1, "closeAfterMin": null, "closeAfterMinBookings": false, "customTickets": [ { "name": "ticket1", "price": 10, "spots": 10, "enabled": true, "dateRanges": "[]" }, { "name": "ticket2", "price": 20, "spots": 20, "enabled": true, "dateRanges": "[]" } ], "maxCustomCapacity": null }'
{
"message": "Successfully added new event.",
"data": {
"events": [
{
"id": 122,
"name": "Amelia Event",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-10-10 14:00:00",
"periodEnd": "2023-10-20 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
}
],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
},
...
]
}
}
イベント詳細を更新します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/events/{{event_id}}
オプションのプロパティ
更新したいプロパティのみを送信してください。
| キー | タイプ | 説明 |
name | string | イベントの名前。 |
periods | array | イベントの期間の配列。期間オブジェクトのフィールド:periodStartとperiodEnd。 |
maxCapacity | integer | イベントの最大人数。 |
price | double | イベントの価格。 |
show | boolean | イベントがお客様側に表示されるかどうか。デフォルトはfalseです。 |
parentId | integer | 繰り返しイベントの場合の、親/最初のイベントのID。 |
bookingOpens | string | イベントの予約受付開始日時。デフォルトでは作成後に開始されます。形式:YYYY-MM-DD HH:mm:ss |
bookingCloses | string | イベントの予約受付終了日時。デフォルトではイベント開始後に終了します。形式:YYYY-MM-DD HH:mm:ss |
bookingOpensRec | string | 繰り返しイベントの予約受付開始日時が最初のイベントと同じか、開始日と受付開始日の差に基づいて計算されるか。使用可能な値:same(同じ)、calculate(計算)。デフォルト値はsameです。 |
bookingClosesRec | string | 繰り返しイベントの予約受付終了日時が最初のイベントと同じか、開始日と受付終了日の差に基づいて計算されるか。使用可能な値:same(同じ)、calculate(計算)。デフォルト値はsameです。 |
recurring | object | イベントの繰り返し設定を定義するオブジェクト。 |
bringingAnyone | boolean | お客様が追加の人物を同伴できるかどうか。デフォルトはfalseです。 |
bookMultipleTimes | boolean | 同じお客様が複数回予約できるかどうか。デフォルトはfalseです。 |
maxExtraPeople | integer | お客様が同伴できる追加の最大人数。 |
tags | array | イベントのタグオブジェクトの配列。 |
providers | array | スタッフとして機能するスタッフIDを含むオブジェクトの配列。 |
description | string | イベントの説明。 |
gallery | array | ギャラリー用の画像パスの配列。 |
color | string | 色のHEX文字列。 |
locationId | integer | 場所ID。 |
customLocation | string | イベントのカスタム場所。 |
settings | string | イベント固有の設定を表すJSON形式の文字列。デフォルトでは基本設定が使用されます。 |
translations | string | イベント名と説明の翻訳を表すJSON形式の文字列。 |
depositPayment | string | 前払金のタイプ。使用可能な値:disabled(無効)、fixed(指定額)、percentage(パーセンテージ)。 |
deposit | integer | 前払金の金額。 |
depositPerPerson | boolean | 前払金が人数によって乗算されるかどうか。デフォルトはfalseです。 |
fullPayment | boolean | お客様が予約時に全額を支払うオプションを持つかどうか。デフォルトはfalseです。 |
customPricing | boolean | カスタム価格設定(チケット)が有効かどうか。デフォルトはfalseです。 |
organizerId | integer | 主催者であるスタッフのID。 |
closeAfterMin | integer | 設定された最小人数に達した場合にイベントを締め切る。 |
closeAfterMinBookings | boolean | closeAfterMinが予約に適用されるか、各予約の人数に適用されるか。デフォルトはfalseで、人数に適用されます。 |
customTickets | array | チケットの配列。 |
maxCustomCapacity | integer | すべてのチケットタイプの合計最大定員。 |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/122' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{ "name": "Amelia Event Updated", "periods": [ { "periodStart": "2023-11-04 14:00:00", "periodEnd": "2023-11-14 22:30:00" } ] }'
{
"message": "Successfully updated event.",
"data": {
"events": [
{
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
}
],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
]
}
}
イベントステータスを更新します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/events/status/{{event_id}}
必須プロパティ
以下のプロパティは必須です。
| キー | タイプ | 説明 |
status | string | イベントの新しいステータス。使用可能な値:visible(表示)、hidden(非表示)、trash(ゴミ箱) |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/status/122' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{ "status": "hidden" }'
{
"message": "Successfully changed event status.",
"data": {
"event": {
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "hidden",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
}
],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
]
}
}
イベントの予約ステータスを更新します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/event-bookings/{{booking_id}}
必須プロパティ
以下のプロパティは必須です。
| キー | タイプ | 説明 |
status | string | 予約の新しいステータス。使用可能な値:approved(承認済み)、pending(保留中)、rejected(拒否済み)、canceled(キャンセル済み) |
オプションのプロパティ
| キー | タイプ | 説明 |
notifyParticipants | boolean | お客様に通知するかどうか。デフォルトはtrueです。 |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/event-bookings/1146' \
--header 'Content-Type: application/json' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0' \
--data '{ "status": "canceled", "notifyParticipants": true }'
{
"message": "Successfully updated booking.",
"data": {
"booking": {
"id": 1146,
"customerId": 16,
"customer": null,
"status": "canceled",
"extras": [],
"couponId": null,
"price": 0,
"coupon": null,
"customFields": "{\"2\":{\"label\":\"Select1\",\"value\":\"\",\"type\":\"select\"},\"5\":{\"label\":\"text3\",\"value\":\"\",\"type\":\"text\"},\"7\":{\"label\":\"My address\",\"value\":\"\",\"type\":\"address\"},\"9\":{\"label\":\"address4\",\"value\":\"\",\"type\":\"address\"},\"13\":{\"label\":\"file\",\"value\":\"\",\"type\":\"file\"}}",
"info": "{\"firstName\":\"Amelia\",\"lastName\":\"Test\",\"phone\":\"+381601234567\",\"locale\":null,\"timeZone\":null,\"urlParams\":null}",
"appointmentId": 851,
"persons": 1,
"token": null,
"payments": [],
"utcOffset": null,
"aggregatedPrice": true,
"isChangedStatus": true,
"isLastBooking": null,
"packageCustomerService": null,
"ticketsData": [],
"duration": 1800,
"created": "2023-11-06 16:33:22",
"actionsCompleted": null,
"isUpdated": null
}
}
}
イベント詳細を取得します。
メソッド
このエンドポイントはGETリクエストを受け付けます。
パス
/events/{{event_id}}
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/122' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully retrieved event.",
"data": {
"event": {
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
}
],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
}
}
イベント詳細を取得します。
メソッド
このエンドポイントはGETリクエストを受け付けます。
パス
/events
オプションのプロパティ
イベントをフィルタリングするために、以下のクエリパラメータを使用できます。
| キー | タイプ | 説明 |
page | integer | 返されるイベントのページ。 |
sort | string | 並べ替え順序。使用可能な値:name、-name、price、-price。マイナス記号は降順を示します。 |
dates | string | 開始日と終了日。形式:YYYY-MM-DD,YYYY-MM-DD。 |
providers | string | スタッフIDの配列。 |
locations | string | 場所IDの配列。 |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events&page=1&sort=name&providers=1&locations=2&dates=2023-11-03,2023-11-04' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully retrieved events.",
"data": {
"events": [
{
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null, "translations": null, "gender": null } ],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
],
"countFiltered": 1,
"countTotal": 1
}
}
カレンダーに表示するイベントを取得します。
メソッド
このエンドポイントはGETリクエストを受け付けます。
パス
/events/calendar
必須プロパティ
以下のクエリパラメータは必須です。
| キー | タイプ | 説明 |
startDate | string | カレンダーイベントを取得する開始日。形式:YYYY-MM-DD。 |
endDate | string | カレンダーイベントを取得する終了日。形式:YYYY-MM-DD。 |
オプションのプロパティ
イベントをフィルタリングするために、以下のクエリパラメータを使用できます。
| キー | タイプ | 説明 |
providers | string | スタッフIDの配列。 |
locations | string | 場所IDの配列。 |
tags | string | タグ名の配列。 |
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/calendar&startDate=2023-11-01&endDate=2023-11-30&providers=1,3&locations=2&tags=tag1' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully retrieved events.",
"data": {
"events": [
{
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null, "translations": null, "gender": null } ],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
]
}
}
イベントを削除した場合に影響を受ける項目を取得します。
メソッド
このエンドポイントはGETリクエストを受け付けます。
パス
/events/delete-effect/{{event_id}}
例:
curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/delete-effect/122' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully retrieved delete effect message.",
"data": {
"valid": true,
"message": ""
}
}
イベント予約を削除します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/event-bookings/delete/{{booking_id}}
例:
curl --location --request POST 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/event-bookings/delete/1146' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully deleted booking.",
"data": {
"booking": {
"id": 1146,
"customerId": 16,
"customer": null,
"status": "canceled",
"extras": [],
"couponId": null,
"price": 0,
"coupon": null,
"customFields": "{\"2\":{\"label\":\"Select1\",\"value\":\"\",\"type\":\"select\"},\"5\":{\"label\":\"text3\",\"value\":\"\",\"type\":\"text\"},\"7\":{\"label\":\"My address\",\"value\":\"\",\"type\":\"address\"},\"9\":{\"label\":\"address4\",\"value\":\"\",\"type\":\"address\"},\"13\":{\"label\":\"file\",\"value\":\"\",\"type\":\"file\"}}",
"info": "{\"firstName\":\"Amelia\",\"lastName\":\"Test\",\"phone\":\"+381601234567\",\"locale\":null,\"timeZone\":null,\"urlParams\":null}",
"appointmentId": 851,
"persons": 1,
"token": null,
"payments": [],
"utcOffset": null,
"aggregatedPrice": true,
"isChangedStatus": true,
"isLastBooking": null,
"packageCustomerService": null,
"ticketsData": [],
"duration": 1800,
"created": "2023-11-06 16:33:22",
"actionsCompleted": null,
"isUpdated": null
}
}
}
イベントを削除します。
メソッド
このエンドポイントはPOSTリクエストを受け付けます。
パス
/events/delete/{{event_id}}
例:
curl --location --request POST 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/events/delete/122' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
"message": "Successfully deleted event.",
"data": {
"event": {
"id": 122,
"name": "Amelia Event Updated",
"description": "",
"color": "#1788FB",
"price": 100,
"deposit": 10,
"depositPayment": "指定額",
"depositPerPerson": true,
"pictureFullPath": null,
"pictureThumbPath": null,
"extras": [],
"coupons": [],
"position": null,
"settings": "{\"payments\":{\"paymentLinks\":{\"enabled\":true,\"changeBookingStatus\":false,\"redirectUrl\":null},\"onSite\":true,\"payPal\":{\"enabled\":true},\"stripe\":{\"enabled\":true},\"mollie\":{\"enabled\":false},\"razorpay\":{\"enabled\":false}},\"general\":{\"minimumTimeRequirementPriorToCanceling\":null,\"redirectUrlAfterAppointment\":null},\"zoom\":{\"enabled\":true},\"lessonSpace\":{\"enabled\":false}}",
"fullPayment": true,
"bookings": [],
"periods": [
{
"id": 125,
"eventId": 122,
"periodStart": "2023-11-04 14:00:00",
"periodEnd": "2023-11-14 22:30:00",
"zoomMeeting": null,
"lessonSpace": null,
"bookings": [],
"googleCalendarEventId": null,
"googleMeetUrl": null,
"outlookCalendarEventId": null
}
],
"bookingOpens": "2023-10-05 14:00:00",
"bookingCloses": "2023-10-09 14:00:00",
"bookingOpensRec": "same",
"bookingClosesRec": "same",
"ticketRangeRec": null,
"status": "approved",
"recurring": {
"cycle": "weekly",
"order": 1,
"until": "2023-10-22 00:00:00",
"cycleInterval": 1,
"monthlyRepeat": "each",
"monthDate": null,
"monthlyOnRepeat": null,
"monthlyOnDay": null
},
"maxCapacity": 100,
"maxCustomCapacity": null,
"show": true,
"tags": [
{
"id": 45,
"eventId": 122,
"name": "tag1"
}
],
"customTickets": [
{
"id": 52,
"eventId": 122,
"name": "ticket1",
"enabled": true,
"price": 10,
"dateRangePrice": null,
"spots": 10,
"dateRanges": "[]",
"sold": 0,
"translations": null
},
{
"id": 53,
"eventId": 122,
"name": "ticket2",
"enabled": true,
"price": 20,
"dateRangePrice": null,
"spots": 20,
"dateRanges": "[]",
"sold": 0,
"translations": null
}
],
"gallery": [],
"providers": [
{
"id": 1,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
},
{
"id": 3,
"firstName": "",
"lastName": "",
"birthday": null,
"email": null,
"phone": null,
"type": "お客様",
"status": null,
"note": null,
"zoomUserId": null,
"countryPhoneIso": null,
"externalId": null,
"pictureFullPath": null,
"pictureThumbPath": null,
"translations": null,
"gender": null
}
],
"notifyParticipants": 1,
"locationId": 2,
"location": null,
"customLocation": null,
"parentId": 122,
"created": "2023-11-03 16:48:54",
"zoomUserId": null,
"organizerId": 1,
"type": "event",
"bringingAnyone": true,
"bookMultipleTimes": true,
"translations": null,
"customPricing": false,
"closeAfterMin": null,
"closeAfterMinBookings": false,
"maxExtraPeople": null,
"initialEventStart": null,
"initialEventEnd": null,
"aggregatedPrice": null
}
]
}
}