fluentcart-developer 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +26 -26
- package/README.md +59 -59
- package/dist/cards/fluentcart/templates-native.js +1087 -1087
- package/dist/cards/fluentcart/tools.js +2309 -2309
- package/dist/skills/fluentcart-developer/SKILL.md +108 -108
- package/dist/skills/fluentcart-developer/examples/README.md +30 -30
- package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/fluent-cart/checkout.php +32 -32
- package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/functions.php +40 -40
- package/dist/skills/fluentcart-developer/examples/sample-custom-addon/fluentcart-custom-addon.php +113 -113
- package/dist/skills/fluentcart-developer/examples/sample-custom-payment-gateway/fluentcart-custom-gateway-example.php +148 -148
- package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
- package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/README.md +22 -22
- package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/sample-plugin-with-licensing-sdk.php +79 -79
- package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/FluentLicensing.php +303 -303
- package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/LicenseSettings.php +566 -566
- package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/PluginUpdater.php +304 -304
- package/dist/skills/fluentcart-developer/examples/sample-shipping-carrier/fluentcart-custom-shipping-carrier.php +61 -61
- package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -452
- package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -786
- package/dist/skills/fluentcart-developer/references/api/customers.md +889 -889
- package/dist/skills/fluentcart-developer/references/api/files.md +609 -609
- package/dist/skills/fluentcart-developer/references/api/index.md +432 -432
- package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -633
- package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -384
- package/dist/skills/fluentcart-developer/references/api/orders.md +814 -814
- package/dist/skills/fluentcart-developer/references/api/products.md +866 -866
- package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -536
- package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -827
- package/dist/skills/fluentcart-developer/references/database/index.md +44 -44
- package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -178
- package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -291
- package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -239
- package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -181
- package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -219
- package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -645
- package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -427
- package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -348
- package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -156
- package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -584
- package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -163
- package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -155
- package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -153
- package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -182
- package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -163
- package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -208
- package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -640
- package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -233
- package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -391
- package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -144
- package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -383
- package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -303
- package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -158
- package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -175
- package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -250
- package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -172
- package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -440
- package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -727
- package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -397
- package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -258
- package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -153
- package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -556
- package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -580
- package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -427
- package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -175
- package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -148
- package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -280
- package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -205
- package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -173
- package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -528
- package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -195
- package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -225
- package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -166
- package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -220
- package/dist/skills/fluentcart-developer/references/database/models.md +404 -404
- package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -860
- package/dist/skills/fluentcart-developer/references/database/readme.md +276 -276
- package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -1002
- package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -395
- package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -4
- package/dist/skills/fluentcart-developer/references/engineering.md +4 -4
- package/dist/skills/fluentcart-developer/references/getting-started.md +249 -249
- package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -519
- package/dist/skills/fluentcart-developer/references/guides/index.md +107 -107
- package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -600
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -237
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -481
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -269
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -223
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -370
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -237
- package/dist/skills/fluentcart-developer/references/guides/subscriptions.md +217 -217
- package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -1079
- package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -1795
- package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -327
- package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -829
- package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -81
- package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -757
- package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -1163
- package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -219
- package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -1019
- package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -1290
- package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -16
- package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -60
- package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -2032
- package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -1746
- package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -2439
- package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -464
- package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -2658
- package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -502
- package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -1785
- package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -2966
- package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -14
- package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -35
- package/dist/skills/fluentcart-developer/references/index.md +625 -625
- package/dist/skills/fluentcart-developer/references/modules/fee-system.md +427 -427
- package/dist/skills/fluentcart-developer/references/modules/ghost-product-selling.md +440 -440
- package/dist/skills/fluentcart-developer/references/modules/index.md +484 -484
- package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -342
- package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -433
- package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -129
- package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -170
- package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -846
- package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -986
- package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -186
- package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -678
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -164
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -1648
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -353
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -1079
- package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -164
- package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -573
- package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -958
- package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -1423
- package/dist/skills/fluentcart-developer/references/restapi/customers.md +1103 -1103
- package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -1083
- package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -132
- package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -846
- package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -313
- package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -127
- package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -1000
- package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -192
- package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -797
- package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -1733
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -66
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -179
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -83
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -87
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -59
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -230
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -75
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -40
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -133
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -138
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -119
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -46
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -92
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -32
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -115
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -69
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -50
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -65
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -135
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -108
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -32
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -72
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -144
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -123
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -53
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -54
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -73
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -64
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -42
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -129
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -133
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -129
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -129
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -57
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -66
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -50
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -101
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -162
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -99
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -51
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -93
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -32
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -46
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -51
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -52
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -50
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -94
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -81
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -75
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -90
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -32
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -51
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -39
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -32
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -41
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -60
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -18
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -67
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -24
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -18
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -24
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -38
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -54
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -46
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -23
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -24
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -193
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -53
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -52
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -141
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -72
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -67
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -98
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -50
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -92
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -68
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -351
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -42
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -61
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -135
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -72
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -48
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -60
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -98
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -172
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -77
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -84
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -51
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -42
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -44
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -19
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -19
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -19
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -53
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -97
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -64
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -59
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -83
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -64
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -45
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -81
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -181
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -60
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -103
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -78
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -74
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -134
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -61
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -98
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -53
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -58
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -225
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -78
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -79
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -105
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -42
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -24
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -36
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -36
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -35
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -36
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -24
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -35
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -43
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -38
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -36
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -40
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -45
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -35
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -73
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -49
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -33
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -34
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -48
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -47
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -18
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -18
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -43
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -106
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -25
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -83
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -44
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -44
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -63
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -26
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -60
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -64
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -67
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -45
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -133
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -68
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -68
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -67
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -58
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -68
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -239
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -48
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -40
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -55
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -73
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -110
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -22
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -112
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -79
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -113
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -62
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -52
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -52
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -70
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -29
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -69
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -30
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -31
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -39
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -70
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -69
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -56
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -51
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -117
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -28
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -27
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -20
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -37
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -58
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -21
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -57
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -50
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -127
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -100
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -110
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -52
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -166
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -54
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -116
- package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -433
- package/dist/skills/fluentcart-developer/references/restapi/orders.md +1212 -1212
- package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -212
- package/dist/skills/fluentcart-developer/references/restapi/products.md +2485 -2485
- package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -191
- package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -3773
- package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -403
- package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -136
- package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -1423
- package/dist/skills/fluentcart-developer/references/restapi/shipping.md +905 -905
- package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -1169
- package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -1551
- package/dist/skills/fluentcart-developer/references/restapi.md +127 -127
- package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +66 -65
|
@@ -1,1423 +1,1423 @@
|
|
|
1
|
-
# Customer Profile API
|
|
2
|
-
|
|
3
|
-
Customer-facing endpoints for managing profiles, viewing orders, handling addresses, and accessing downloads. These endpoints are used by the storefront customer portal.
|
|
4
|
-
|
|
5
|
-
**Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
|
|
6
|
-
|
|
7
|
-
**Policy:** `CustomerFrontendPolicy` (requires authenticated customer)
|
|
8
|
-
|
|
9
|
-
> These are frontend endpoints accessed by logged-in customers, not admin users. The policy checks `is_user_logged_in()` and each endpoint verifies that the authenticated user matches the requested customer record.
|
|
10
|
-
|
|
11
|
-
> All monetary values are in **cents** (e.g., `$10.00` = `1000`).
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Customer Management
|
|
16
|
-
|
|
17
|
-
Endpoints under the `customers` prefix for retrieving and updating the current customer's details.
|
|
18
|
-
|
|
19
|
-
### Get Customer Details
|
|
20
|
-
|
|
21
|
-
GET `/fluent-cart/v2/customers/{customerId}`
|
|
22
|
-
|
|
23
|
-
Retrieve the details of the currently authenticated customer. The `customerId` must match the logged-in customer's record.
|
|
24
|
-
|
|
25
|
-
#### Parameters
|
|
26
|
-
|
|
27
|
-
| Parameter | Type | Location | Required | Description |
|
|
28
|
-
| --- | --- | --- | --- | --- |
|
|
29
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
30
|
-
| `with` | array | query | No | Relationships to eager-load (e.g., `billing_address`, `shipping_address`, `orders`) |
|
|
31
|
-
|
|
32
|
-
#### Response
|
|
33
|
-
|
|
34
|
-
**Success (200):**
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
{
|
|
38
|
-
"customer": {
|
|
39
|
-
"id": 1,
|
|
40
|
-
"user_id": 5,
|
|
41
|
-
"email": "[email protected]",
|
|
42
|
-
"first_name": "John",
|
|
43
|
-
"last_name": "Doe",
|
|
44
|
-
"status": "active",
|
|
45
|
-
"purchase_value": {},
|
|
46
|
-
"purchase_count": 3,
|
|
47
|
-
"ltv": 15000,
|
|
48
|
-
"country": "US",
|
|
49
|
-
"city": "New York",
|
|
50
|
-
"state": "NY",
|
|
51
|
-
"postcode": "10001",
|
|
52
|
-
"created_at": "2025-01-10 08:00:00",
|
|
53
|
-
"updated_at": "2025-06-20 14:00:00"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**Error (403):**
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
{
|
|
62
|
-
"message": "You are not authorized to view this customer"
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### Example
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/1?with[]=billing_address" \
|
|
70
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### Update Customer Details
|
|
76
|
-
|
|
77
|
-
PUT `/fluent-cart/v2/customers/{customerId}`
|
|
78
|
-
|
|
79
|
-
Update the authenticated customer's profile details. The `customerId` must match the logged-in customer's record.
|
|
80
|
-
|
|
81
|
-
#### Parameters
|
|
82
|
-
|
|
83
|
-
| Parameter | Type | Location | Required | Description |
|
|
84
|
-
| --- | --- | --- | --- | --- |
|
|
85
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
86
|
-
| `email` | string | body | Yes | Customer email address. Must be unique and valid. Max 255 characters. |
|
|
87
|
-
| `first_name` | string | body | Conditional | Customer first name. Required when store uses separate name fields. Max 255 characters. |
|
|
88
|
-
| `last_name` | string | body | No | Customer last name. Max 255 characters. |
|
|
89
|
-
| `full_name` | string | body | Conditional | Customer full name. Required when store uses full name mode. Max 255 characters. |
|
|
90
|
-
| `city` | string | body | No | Customer city |
|
|
91
|
-
| `state` | string | body | No | Customer state/province code |
|
|
92
|
-
| `postcode` | string | body | No | Customer postal/zip code |
|
|
93
|
-
| `country` | string | body | No | Customer country code (e.g., `US`, `GB`) |
|
|
94
|
-
| `notes` | string | body | No | Internal notes about the customer |
|
|
95
|
-
| `status` | string | body | No | Customer status |
|
|
96
|
-
|
|
97
|
-
#### Response
|
|
98
|
-
|
|
99
|
-
**Success (200):**
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
{
|
|
103
|
-
"message": "Customer updated successfully!",
|
|
104
|
-
"data": {
|
|
105
|
-
"id": 1,
|
|
106
|
-
"email": "[email protected]",
|
|
107
|
-
"first_name": "John",
|
|
108
|
-
"last_name": "Doe"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Error (403):**
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
{
|
|
117
|
-
"message": "You are not authorized to update this customer"
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
#### Example
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customers/1" \
|
|
125
|
-
-H "Content-Type: application/json" \
|
|
126
|
-
-d '{"first_name": "John", "last_name": "Smith", "email": "[email protected]"}' \
|
|
127
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
### Get Customer Orders (Customer Prefix)
|
|
133
|
-
|
|
134
|
-
GET `/fluent-cart/v2/customers/{customerId}/orders`
|
|
135
|
-
|
|
136
|
-
Retrieve a paginated list of orders for the specified customer. The `customerId` must match the logged-in user.
|
|
137
|
-
|
|
138
|
-
#### Parameters
|
|
139
|
-
|
|
140
|
-
| Parameter | Type | Location | Required | Description |
|
|
141
|
-
| --- | --- | --- | --- | --- |
|
|
142
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
143
|
-
| `per_page` | integer | query | No | Number of items per page (default: 15) |
|
|
144
|
-
|
|
145
|
-
#### Response
|
|
146
|
-
|
|
147
|
-
**Success (200):**
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
{
|
|
151
|
-
"orders": {
|
|
152
|
-
"total": 25,
|
|
153
|
-
"per_page": 15,
|
|
154
|
-
"current_page": 1,
|
|
155
|
-
"last_page": 2,
|
|
156
|
-
"data": [
|
|
157
|
-
{
|
|
158
|
-
"id": 101,
|
|
159
|
-
"invoice_no": "INV-000101",
|
|
160
|
-
"total_amount": 4999,
|
|
161
|
-
"uuid": "abc-123-def",
|
|
162
|
-
"type": "one-time",
|
|
163
|
-
"status": "completed",
|
|
164
|
-
"created_at": "2025-06-15 10:30:00"
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Error (returns empty when unauthorized):**
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
{
|
|
175
|
-
"orders": []
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
#### Example
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/1/orders?per_page=10" \
|
|
183
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
## Address Management (Customer Prefix)
|
|
189
|
-
|
|
190
|
-
Endpoints under the `customers` prefix for managing customer addresses during checkout and in the customer account.
|
|
191
|
-
|
|
192
|
-
### Select Address for Checkout
|
|
193
|
-
|
|
194
|
-
GET `/fluent-cart/v2/customers/{customerAddressId}/update-address-select`
|
|
195
|
-
|
|
196
|
-
Select an existing address and apply it to the current cart/checkout session. Updates the cart's checkout data with the selected address and returns the rendered address HTML along with updated checkout fragments.
|
|
197
|
-
|
|
198
|
-
#### Parameters
|
|
199
|
-
|
|
200
|
-
| Parameter | Type | Location | Required | Description |
|
|
201
|
-
| --- | --- | --- | --- | --- |
|
|
202
|
-
| `customerAddressId` | integer | path | Yes | The address record ID to select |
|
|
203
|
-
| `with` | array | query | No | Relationships to eager-load on the address |
|
|
204
|
-
| `fct_cart_hash` | string | query | No | Cart hash identifier to locate the active cart session |
|
|
205
|
-
|
|
206
|
-
#### Response
|
|
207
|
-
|
|
208
|
-
**Success (200):**
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
{
|
|
212
|
-
"message": "Address Attached",
|
|
213
|
-
"data": "<div class=\"fct-address-info\">...</div>",
|
|
214
|
-
"fragments": {
|
|
215
|
-
".fct-checkout-summary": "<div>...updated summary HTML...</div>"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
**Error (404):**
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
{
|
|
224
|
-
"message": "Address not found"
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**Error (403):**
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
{
|
|
232
|
-
"message": "You are not authorized to view this address"
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
#### Example
|
|
237
|
-
|
|
238
|
-
```
|
|
239
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/5/update-address-select?fct_cart_hash=abc123" \
|
|
240
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
### Create Address (Checkout)
|
|
246
|
-
|
|
247
|
-
POST `/fluent-cart/v2/customers/add-address`
|
|
248
|
-
|
|
249
|
-
Create a new address for the currently authenticated customer. Used during checkout to add a new billing or shipping address. After creation, returns updated address selector HTML for the checkout form.
|
|
250
|
-
|
|
251
|
-
#### Parameters
|
|
252
|
-
|
|
253
|
-
| Parameter | Type | Location | Required | Description |
|
|
254
|
-
| --- | --- | --- | --- | --- |
|
|
255
|
-
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
256
|
-
| `product_type` | string | body | No | Product fulfillment type (e.g., `physical`, `digital`). Used for field validation rules. |
|
|
257
|
-
| `label` | string | body | No | Short label for the address (max 15 characters, e.g., `Home`, `Office`) |
|
|
258
|
-
| `billing_name` or `shipping_name` | string | body | No | Contact name (prefixed with address type) |
|
|
259
|
-
| `billing_address_1` or `shipping_address_1` | string | body | Yes | Primary street address (prefixed with address type) |
|
|
260
|
-
| `billing_address_2` or `shipping_address_2` | string | body | No | Secondary address line (prefixed with address type) |
|
|
261
|
-
| `billing_city` or `shipping_city` | string | body | Yes | City (prefixed with address type) |
|
|
262
|
-
| `billing_state` or `shipping_state` | string | body | Conditional | State/province code. Required if the country has states. (prefixed with address type) |
|
|
263
|
-
| `billing_postcode` or `shipping_postcode` | string | body | Conditional | Postal/zip code. Validated against country format. (prefixed with address type) |
|
|
264
|
-
| `billing_country` or `shipping_country` | string | body | Yes | Country code (e.g., `US`, `GB`). (prefixed with address type) |
|
|
265
|
-
| `billing_phone` or `shipping_phone` | string | body | No | Phone number (prefixed with address type) |
|
|
266
|
-
| `billing_email` or `shipping_email` | string | body | No | Email address (prefixed with address type) |
|
|
267
|
-
|
|
268
|
-
> **Note:** All address fields are prefixed with the address `type` (e.g., `billing_address_1` for a billing address, `shipping_city` for shipping). The prefix is stripped before storage.
|
|
269
|
-
|
|
270
|
-
#### Response
|
|
271
|
-
|
|
272
|
-
**Success (200):**
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
{
|
|
276
|
-
"message": "Customer address created successfully!",
|
|
277
|
-
"fragment": [
|
|
278
|
-
{
|
|
279
|
-
"selector": "[data-fluent-cart-checkout-page-form-address-modal-address-selector-button-wrapper]",
|
|
280
|
-
"content": "<div>...updated address selector HTML...</div>",
|
|
281
|
-
"type": "replace"
|
|
282
|
-
}
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**Error (422 - validation):**
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
{
|
|
291
|
-
"status": "failed",
|
|
292
|
-
"errors": {
|
|
293
|
-
"billing_country": {
|
|
294
|
-
"required": "Country is required."
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**Error (no customer):**
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
{
|
|
304
|
-
"message": "You don't have any associated account"
|
|
305
|
-
}
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
#### Example
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customers/add-address" \
|
|
312
|
-
-H "Content-Type: application/json" \
|
|
313
|
-
-d '{
|
|
314
|
-
"type": "billing",
|
|
315
|
-
"billing_name": "John Doe",
|
|
316
|
-
"billing_address_1": "123 Main St",
|
|
317
|
-
"billing_city": "New York",
|
|
318
|
-
"billing_state": "NY",
|
|
319
|
-
"billing_postcode": "10001",
|
|
320
|
-
"billing_country": "US",
|
|
321
|
-
"billing_phone": "+1234567890",
|
|
322
|
-
"label": "Home"
|
|
323
|
-
}' \
|
|
324
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
### Update Address (Checkout)
|
|
330
|
-
|
|
331
|
-
PUT `/fluent-cart/v2/customers/{customerId}/address`
|
|
332
|
-
|
|
333
|
-
Update an existing address for the authenticated customer. The address ID is passed in the request body.
|
|
334
|
-
|
|
335
|
-
#### Parameters
|
|
336
|
-
|
|
337
|
-
| Parameter | Type | Location | Required | Description |
|
|
338
|
-
| --- | --- | --- | --- | --- |
|
|
339
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
340
|
-
| `address.id` | integer | body | Yes | The address record ID to update |
|
|
341
|
-
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
342
|
-
| `billing_label` or `shipping_label` | string | body | Yes | Short label (max 15 characters). Prefixed with address type. |
|
|
343
|
-
| `billing_name` or `shipping_name` | string | body | No | Contact name (prefixed with address type) |
|
|
344
|
-
| `billing_address_1` or `shipping_address_1` | string | body | Yes | Primary street address (prefixed with address type) |
|
|
345
|
-
| `billing_address_2` or `shipping_address_2` | string | body | No | Secondary address line (prefixed with address type) |
|
|
346
|
-
| `billing_city` or `shipping_city` | string | body | Yes | City (prefixed with address type) |
|
|
347
|
-
| `billing_state` or `shipping_state` | string | body | Conditional | State/province code (prefixed with address type) |
|
|
348
|
-
| `billing_postcode` or `shipping_postcode` | string | body | Conditional | Postal/zip code (prefixed with address type) |
|
|
349
|
-
| `billing_country` or `shipping_country` | string | body | Yes | Country code (prefixed with address type) |
|
|
350
|
-
|
|
351
|
-
#### Response
|
|
352
|
-
|
|
353
|
-
**Success (200):**
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
{
|
|
357
|
-
"message": "Address updated successfully"
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
**Error (403):**
|
|
362
|
-
|
|
363
|
-
```
|
|
364
|
-
{
|
|
365
|
-
"message": "You are not authorized to update this address"
|
|
366
|
-
}
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
#### Example
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customers/1/address" \
|
|
373
|
-
-H "Content-Type: application/json" \
|
|
374
|
-
-d '{
|
|
375
|
-
"type": "billing",
|
|
376
|
-
"address": {"id": 5},
|
|
377
|
-
"billing_name": "John Doe",
|
|
378
|
-
"billing_address_1": "456 Oak Ave",
|
|
379
|
-
"billing_city": "Boston",
|
|
380
|
-
"billing_state": "MA",
|
|
381
|
-
"billing_postcode": "02101",
|
|
382
|
-
"billing_country": "US",
|
|
383
|
-
"billing_label": "Work"
|
|
384
|
-
}' \
|
|
385
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
---
|
|
389
|
-
|
|
390
|
-
### Delete Address (Checkout)
|
|
391
|
-
|
|
392
|
-
DELETE `/fluent-cart/v2/customers/{customerId}/address`
|
|
393
|
-
|
|
394
|
-
Delete an existing address for the authenticated customer. The address ID is passed in the request body.
|
|
395
|
-
|
|
396
|
-
#### Parameters
|
|
397
|
-
|
|
398
|
-
| Parameter | Type | Location | Required | Description |
|
|
399
|
-
| --- | --- | --- | --- | --- |
|
|
400
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
401
|
-
| `address.id` | integer | body | Yes | The address record ID to delete |
|
|
402
|
-
|
|
403
|
-
#### Response
|
|
404
|
-
|
|
405
|
-
**Success (200):**
|
|
406
|
-
|
|
407
|
-
```
|
|
408
|
-
{
|
|
409
|
-
"message": "Address deleted successfully"
|
|
410
|
-
}
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
**Error (403):**
|
|
414
|
-
|
|
415
|
-
```
|
|
416
|
-
{
|
|
417
|
-
"message": "You are not authorized to delete this address"
|
|
418
|
-
}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
#### Example
|
|
422
|
-
|
|
423
|
-
```
|
|
424
|
-
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/customers/1/address" \
|
|
425
|
-
-H "Content-Type: application/json" \
|
|
426
|
-
-d '{"address": {"id": 5}}' \
|
|
427
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
---
|
|
431
|
-
|
|
432
|
-
### Set Address as Primary
|
|
433
|
-
|
|
434
|
-
POST `/fluent-cart/v2/customers/{customerId}/address/make-primary`
|
|
435
|
-
|
|
436
|
-
Mark a specific address as the primary address for its type (billing or shipping). All other addresses of the same type are demoted.
|
|
437
|
-
|
|
438
|
-
#### Parameters
|
|
439
|
-
|
|
440
|
-
| Parameter | Type | Location | Required | Description |
|
|
441
|
-
| --- | --- | --- | --- | --- |
|
|
442
|
-
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
443
|
-
| `address.id` | integer | body | Yes | The address record ID to set as primary |
|
|
444
|
-
| `address.type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
445
|
-
|
|
446
|
-
#### Response
|
|
447
|
-
|
|
448
|
-
**Success (200):**
|
|
449
|
-
|
|
450
|
-
```
|
|
451
|
-
{
|
|
452
|
-
"message": "Address successfully set as the primary"
|
|
453
|
-
}
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
**Error (403):**
|
|
457
|
-
|
|
458
|
-
```
|
|
459
|
-
{
|
|
460
|
-
"message": "You are not authorized to update this address"
|
|
461
|
-
}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
#### Example
|
|
465
|
-
|
|
466
|
-
```
|
|
467
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customers/1/address/make-primary" \
|
|
468
|
-
-H "Content-Type: application/json" \
|
|
469
|
-
-d '{"address": {"id": 5, "type": "billing"}}' \
|
|
470
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
## Profile Management
|
|
476
|
-
|
|
477
|
-
Endpoints under the `customer-profile` prefix for the customer portal dashboard and profile settings.
|
|
478
|
-
|
|
479
|
-
### Dashboard Overview
|
|
480
|
-
|
|
481
|
-
GET `/fluent-cart/v2/customer-profile/`
|
|
482
|
-
|
|
483
|
-
Retrieve the customer's dashboard overview including the 5 most recent orders. This is the landing page data for the customer portal.
|
|
484
|
-
|
|
485
|
-
#### Parameters
|
|
486
|
-
|
|
487
|
-
No parameters required.
|
|
488
|
-
|
|
489
|
-
#### Response
|
|
490
|
-
|
|
491
|
-
**Success (200):**
|
|
492
|
-
|
|
493
|
-
```
|
|
494
|
-
{
|
|
495
|
-
"message": "Success",
|
|
496
|
-
"dashboard_data": {
|
|
497
|
-
"orders": [
|
|
498
|
-
{
|
|
499
|
-
"created_at": "2025-06-15 10:30:00",
|
|
500
|
-
"invoice_no": "INV-000101",
|
|
501
|
-
"total_amount": 4999,
|
|
502
|
-
"uuid": "abc-123-def",
|
|
503
|
-
"type": "one-time",
|
|
504
|
-
"status": "completed",
|
|
505
|
-
"renewals_count": 0,
|
|
506
|
-
"order_items": [
|
|
507
|
-
{
|
|
508
|
-
"id": 1,
|
|
509
|
-
"post_title": "Premium Plugin",
|
|
510
|
-
"title": "Premium Plugin - Single Site",
|
|
511
|
-
"quantity": 1,
|
|
512
|
-
"payment_type": "one-time",
|
|
513
|
-
"line_meta": {
|
|
514
|
-
"bundle_parent_item_id": null
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
]
|
|
520
|
-
},
|
|
521
|
-
"sections_parts": {
|
|
522
|
-
"before_orders_table": "",
|
|
523
|
-
"after_orders_table": ""
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
> The `sections_parts` object contains HTML strings injected by extensions via the `fluent_cart/customer_dashboard_data` filter.
|
|
529
|
-
|
|
530
|
-
#### Example
|
|
531
|
-
|
|
532
|
-
```
|
|
533
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/" \
|
|
534
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
---
|
|
538
|
-
|
|
539
|
-
### Get Profile Details
|
|
540
|
-
|
|
541
|
-
GET `/fluent-cart/v2/customer-profile/profile`
|
|
542
|
-
|
|
543
|
-
Retrieve the authenticated customer's profile details including name, email, and associated addresses. If the logged-in user does not yet have a customer record, basic WordPress user data is returned instead.
|
|
544
|
-
|
|
545
|
-
#### Parameters
|
|
546
|
-
|
|
547
|
-
No parameters required.
|
|
548
|
-
|
|
549
|
-
#### Response
|
|
550
|
-
|
|
551
|
-
**Success (200) - Existing customer:**
|
|
552
|
-
|
|
553
|
-
```
|
|
554
|
-
{
|
|
555
|
-
"message": "Success",
|
|
556
|
-
"data": {
|
|
557
|
-
"first_name": "John",
|
|
558
|
-
"last_name": "Doe",
|
|
559
|
-
"email": "[email protected]",
|
|
560
|
-
"billing_address": [
|
|
561
|
-
{
|
|
562
|
-
"id": 1,
|
|
563
|
-
"customer_id": 1,
|
|
564
|
-
"type": "billing",
|
|
565
|
-
"name": "John Doe",
|
|
566
|
-
"address_1": "123 Main St",
|
|
567
|
-
"address_2": "",
|
|
568
|
-
"city": "New York",
|
|
569
|
-
"state": "NY",
|
|
570
|
-
"postcode": "10001",
|
|
571
|
-
"country": "US",
|
|
572
|
-
"is_primary": "1",
|
|
573
|
-
"status": "active"
|
|
574
|
-
}
|
|
575
|
-
],
|
|
576
|
-
"shipping_address": []
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
**Success (200) - User without customer record:**
|
|
582
|
-
|
|
583
|
-
```
|
|
584
|
-
{
|
|
585
|
-
"message": "Success",
|
|
586
|
-
"data": {
|
|
587
|
-
"first_name": "Jane",
|
|
588
|
-
"last_name": "Smith",
|
|
589
|
-
"user_login": "janesmith",
|
|
590
|
-
"user_email": "[email protected]",
|
|
591
|
-
"email": "[email protected]",
|
|
592
|
-
"user_nicename": "janesmith",
|
|
593
|
-
"display_name": "Jane Smith",
|
|
594
|
-
"billing_address": [],
|
|
595
|
-
"shipping_address": [],
|
|
596
|
-
"not_a_customer": true
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
#### Example
|
|
602
|
-
|
|
603
|
-
```
|
|
604
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/profile" \
|
|
605
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
---
|
|
609
|
-
|
|
610
|
-
### Update Profile Details
|
|
611
|
-
|
|
612
|
-
POST `/fluent-cart/v2/customer-profile/update`
|
|
613
|
-
|
|
614
|
-
Update the authenticated customer's profile name. Also updates the associated WordPress user's `first_name`, `last_name`, and `display_name`.
|
|
615
|
-
|
|
616
|
-
#### Parameters
|
|
617
|
-
|
|
618
|
-
| Parameter | Type | Location | Required | Description |
|
|
619
|
-
| --- | --- | --- | --- | --- |
|
|
620
|
-
| `first_name` | string | body | No | Customer first name. Max 255 characters. |
|
|
621
|
-
| `last_name` | string | body | No | Customer last name. Max 255 characters. |
|
|
622
|
-
| `email` | string | body | Yes | Customer email address. Must be valid. |
|
|
623
|
-
| `current_password` | string | body | No | Current password (for password change flow) |
|
|
624
|
-
| `new_password` | string | body | No | New password (for password change flow) |
|
|
625
|
-
| `confirm_new_password` | string | body | No | Confirm new password (for password change flow) |
|
|
626
|
-
|
|
627
|
-
#### Response
|
|
628
|
-
|
|
629
|
-
**Success (200):**
|
|
630
|
-
|
|
631
|
-
```
|
|
632
|
-
{
|
|
633
|
-
"message": "Profile updated successfully"
|
|
634
|
-
}
|
|
635
|
-
```
|
|
636
|
-
|
|
637
|
-
**Error (customer not found):**
|
|
638
|
-
|
|
639
|
-
```
|
|
640
|
-
{
|
|
641
|
-
"message": "Customer not found"
|
|
642
|
-
}
|
|
643
|
-
```
|
|
644
|
-
|
|
645
|
-
**Error (not logged in):**
|
|
646
|
-
|
|
647
|
-
```
|
|
648
|
-
{
|
|
649
|
-
"message": "You are not logged in"
|
|
650
|
-
}
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
#### Example
|
|
654
|
-
|
|
655
|
-
```
|
|
656
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/update" \
|
|
657
|
-
-H "Content-Type: application/json" \
|
|
658
|
-
-d '{"first_name": "John", "last_name": "Smith", "email": "[email protected]"}' \
|
|
659
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
---
|
|
663
|
-
|
|
664
|
-
## Address Management (Profile)
|
|
665
|
-
|
|
666
|
-
Endpoints under the `customer-profile` prefix for managing addresses from the customer portal profile page. These use a simpler interface compared to the checkout address endpoints.
|
|
667
|
-
|
|
668
|
-
### Create Profile Address
|
|
669
|
-
|
|
670
|
-
POST `/fluent-cart/v2/customer-profile/create-address`
|
|
671
|
-
|
|
672
|
-
Create a new address for the authenticated customer from the profile management page.
|
|
673
|
-
|
|
674
|
-
#### Parameters
|
|
675
|
-
|
|
676
|
-
| Parameter | Type | Location | Required | Description |
|
|
677
|
-
| --- | --- | --- | --- | --- |
|
|
678
|
-
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
679
|
-
| `name` | string | body | Yes | Contact name. Max 255 characters. |
|
|
680
|
-
| `label` | string | body | No | Short label for the address (max 15 characters, e.g., `Home`, `Work`) |
|
|
681
|
-
| `address_1` | string | body | No | Primary street address |
|
|
682
|
-
| `address_2` | string | body | No | Secondary address line |
|
|
683
|
-
| `city` | string | body | No | City. Max 255 characters. |
|
|
684
|
-
| `state` | string | body | No | State/province code. Max 255 characters. |
|
|
685
|
-
| `postcode` | string | body | Yes | Postal/zip code |
|
|
686
|
-
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
687
|
-
| `phone` | string | body | No | Phone number |
|
|
688
|
-
| `email` | string | body | Yes | Email address |
|
|
689
|
-
| `company_name` | string | body | No | Company name. Max 255 characters. |
|
|
690
|
-
| `is_primary` | integer | body | No | Set to `1` to make this the primary address. Defaults to `0`. Automatically set to `1` if no primary address exists. |
|
|
691
|
-
|
|
692
|
-
#### Response
|
|
693
|
-
|
|
694
|
-
**Success (200):**
|
|
695
|
-
|
|
696
|
-
```
|
|
697
|
-
{
|
|
698
|
-
"message": "Customer address created successfully!",
|
|
699
|
-
"data": {
|
|
700
|
-
"is_created": {
|
|
701
|
-
"id": 10,
|
|
702
|
-
"customer_id": 1,
|
|
703
|
-
"type": "billing",
|
|
704
|
-
"name": "John Doe",
|
|
705
|
-
"address_1": "123 Main St",
|
|
706
|
-
"city": "New York",
|
|
707
|
-
"state": "NY",
|
|
708
|
-
"postcode": "10001",
|
|
709
|
-
"country": "US",
|
|
710
|
-
"is_primary": "1",
|
|
711
|
-
"status": "active"
|
|
712
|
-
},
|
|
713
|
-
"total_address_count": 2
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
```
|
|
717
|
-
|
|
718
|
-
**Error (validation):**
|
|
719
|
-
|
|
720
|
-
```
|
|
721
|
-
{
|
|
722
|
-
"message": "Name field is required."
|
|
723
|
-
}
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
#### Example
|
|
727
|
-
|
|
728
|
-
```
|
|
729
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/create-address" \
|
|
730
|
-
-H "Content-Type: application/json" \
|
|
731
|
-
-d '{
|
|
732
|
-
"type": "billing",
|
|
733
|
-
"name": "John Doe",
|
|
734
|
-
"address_1": "123 Main St",
|
|
735
|
-
"city": "New York",
|
|
736
|
-
"state": "NY",
|
|
737
|
-
"postcode": "10001",
|
|
738
|
-
"country": "US",
|
|
739
|
-
"phone": "+1234567890",
|
|
740
|
-
"email": "[email protected]",
|
|
741
|
-
"label": "Home"
|
|
742
|
-
}' \
|
|
743
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
744
|
-
```
|
|
745
|
-
|
|
746
|
-
---
|
|
747
|
-
|
|
748
|
-
### Update Profile Address
|
|
749
|
-
|
|
750
|
-
POST `/fluent-cart/v2/customer-profile/edit-address`
|
|
751
|
-
|
|
752
|
-
Update an existing address from the profile management page. The address must belong to the authenticated customer.
|
|
753
|
-
|
|
754
|
-
#### Parameters
|
|
755
|
-
|
|
756
|
-
| Parameter | Type | Location | Required | Description |
|
|
757
|
-
| --- | --- | --- | --- | --- |
|
|
758
|
-
| `id` | integer | body | Yes | The address record ID to update |
|
|
759
|
-
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
760
|
-
| `name` | string | body | Yes | Contact name. Max 255 characters. |
|
|
761
|
-
| `label` | string | body | No | Short label (max 15 characters) |
|
|
762
|
-
| `address_1` | string | body | No | Primary street address |
|
|
763
|
-
| `address_2` | string | body | No | Secondary address line |
|
|
764
|
-
| `city` | string | body | No | City. Max 255 characters. |
|
|
765
|
-
| `state` | string | body | No | State/province code. Max 255 characters. |
|
|
766
|
-
| `postcode` | string | body | Yes | Postal/zip code |
|
|
767
|
-
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
768
|
-
| `phone` | string | body | No | Phone number |
|
|
769
|
-
| `email` | string | body | Yes | Email address |
|
|
770
|
-
| `company_name` | string | body | No | Company name. Max 255 characters. |
|
|
771
|
-
|
|
772
|
-
#### Response
|
|
773
|
-
|
|
774
|
-
**Success (200):**
|
|
775
|
-
|
|
776
|
-
```
|
|
777
|
-
{
|
|
778
|
-
"message": "Customer address updated successfully!",
|
|
779
|
-
"data": {
|
|
780
|
-
"id": 5,
|
|
781
|
-
"customer_id": 1,
|
|
782
|
-
"type": "billing",
|
|
783
|
-
"name": "John Smith",
|
|
784
|
-
"address_1": "456 Oak Ave",
|
|
785
|
-
"city": "Boston",
|
|
786
|
-
"state": "MA",
|
|
787
|
-
"postcode": "02101",
|
|
788
|
-
"country": "US"
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
```
|
|
792
|
-
|
|
793
|
-
**Error (403):**
|
|
794
|
-
|
|
795
|
-
```
|
|
796
|
-
{
|
|
797
|
-
"message": "You are not authorized to update this address"
|
|
798
|
-
}
|
|
799
|
-
```
|
|
800
|
-
|
|
801
|
-
#### Example
|
|
802
|
-
|
|
803
|
-
```
|
|
804
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/edit-address" \
|
|
805
|
-
-H "Content-Type: application/json" \
|
|
806
|
-
-d '{
|
|
807
|
-
"id": 5,
|
|
808
|
-
"type": "billing",
|
|
809
|
-
"name": "John Smith",
|
|
810
|
-
"address_1": "456 Oak Ave",
|
|
811
|
-
"city": "Boston",
|
|
812
|
-
"state": "MA",
|
|
813
|
-
"postcode": "02101",
|
|
814
|
-
"country": "US",
|
|
815
|
-
"email": "[email protected]"
|
|
816
|
-
}' \
|
|
817
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
818
|
-
```
|
|
819
|
-
|
|
820
|
-
---
|
|
821
|
-
|
|
822
|
-
### Make Profile Address Primary
|
|
823
|
-
|
|
824
|
-
POST `/fluent-cart/v2/customer-profile/make-primary-address`
|
|
825
|
-
|
|
826
|
-
Set a specific address as the primary address for its type. All other addresses of the same type for the customer are demoted.
|
|
827
|
-
|
|
828
|
-
#### Parameters
|
|
829
|
-
|
|
830
|
-
| Parameter | Type | Location | Required | Description |
|
|
831
|
-
| --- | --- | --- | --- | --- |
|
|
832
|
-
| `addressId` | integer | body | Yes | The address record ID to set as primary |
|
|
833
|
-
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
834
|
-
|
|
835
|
-
#### Response
|
|
836
|
-
|
|
837
|
-
**Success (200):**
|
|
838
|
-
|
|
839
|
-
```
|
|
840
|
-
{
|
|
841
|
-
"message": "Address successfully set as the primary"
|
|
842
|
-
}
|
|
843
|
-
```
|
|
844
|
-
|
|
845
|
-
**Error (403):**
|
|
846
|
-
|
|
847
|
-
```
|
|
848
|
-
{
|
|
849
|
-
"message": "You are not authorized to update this address"
|
|
850
|
-
}
|
|
851
|
-
```
|
|
852
|
-
|
|
853
|
-
#### Example
|
|
854
|
-
|
|
855
|
-
```
|
|
856
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/make-primary-address" \
|
|
857
|
-
-H "Content-Type: application/json" \
|
|
858
|
-
-d '{"addressId": 5, "type": "billing"}' \
|
|
859
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
860
|
-
```
|
|
861
|
-
|
|
862
|
-
---
|
|
863
|
-
|
|
864
|
-
### Delete Profile Address
|
|
865
|
-
|
|
866
|
-
POST `/fluent-cart/v2/customer-profile/delete-address`
|
|
867
|
-
|
|
868
|
-
Delete an address from the customer's profile. The address must belong to the authenticated customer. Primary addresses and the last remaining address cannot be deleted.
|
|
869
|
-
|
|
870
|
-
#### Parameters
|
|
871
|
-
|
|
872
|
-
| Parameter | Type | Location | Required | Description |
|
|
873
|
-
| --- | --- | --- | --- | --- |
|
|
874
|
-
| `addressId` | integer | body | Yes | The address record ID to delete |
|
|
875
|
-
|
|
876
|
-
#### Response
|
|
877
|
-
|
|
878
|
-
**Success (200):**
|
|
879
|
-
|
|
880
|
-
```
|
|
881
|
-
{
|
|
882
|
-
"message": "Address successfully deleted."
|
|
883
|
-
}
|
|
884
|
-
```
|
|
885
|
-
|
|
886
|
-
**Error (address is primary):**
|
|
887
|
-
|
|
888
|
-
```
|
|
889
|
-
{
|
|
890
|
-
"message": "Primary address cannot be deleted!"
|
|
891
|
-
}
|
|
892
|
-
```
|
|
893
|
-
|
|
894
|
-
**Error (last address):**
|
|
895
|
-
|
|
896
|
-
```
|
|
897
|
-
{
|
|
898
|
-
"message": "At least one address must remain. Address deletion failed!"
|
|
899
|
-
}
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
**Error (403):**
|
|
903
|
-
|
|
904
|
-
```
|
|
905
|
-
{
|
|
906
|
-
"message": "You are not authorized to update this address"
|
|
907
|
-
}
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
**Error (missing ID):**
|
|
911
|
-
|
|
912
|
-
```
|
|
913
|
-
{
|
|
914
|
-
"message": "Address ID is required"
|
|
915
|
-
}
|
|
916
|
-
```
|
|
917
|
-
|
|
918
|
-
#### Example
|
|
919
|
-
|
|
920
|
-
```
|
|
921
|
-
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/delete-address" \
|
|
922
|
-
-H "Content-Type: application/json" \
|
|
923
|
-
-d '{"addressId": 5}' \
|
|
924
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
---
|
|
928
|
-
|
|
929
|
-
## Orders
|
|
930
|
-
|
|
931
|
-
Endpoints under the `customer-profile` prefix for viewing orders and managing order-related data in the customer portal.
|
|
932
|
-
|
|
933
|
-
### List Orders
|
|
934
|
-
|
|
935
|
-
GET `/fluent-cart/v2/customer-profile/orders`
|
|
936
|
-
|
|
937
|
-
Retrieve a paginated list of the authenticated customer's orders. Excludes renewal orders that have a parent subscription order. Supports text search across order fields.
|
|
938
|
-
|
|
939
|
-
#### Parameters
|
|
940
|
-
|
|
941
|
-
| Parameter | Type | Location | Required | Description |
|
|
942
|
-
| --- | --- | --- | --- | --- |
|
|
943
|
-
| `per_page` | integer | query | No | Number of items per page (default: 10) |
|
|
944
|
-
| `page` | integer | query | No | Page number for pagination (default: 1) |
|
|
945
|
-
| `search` | string | query | No | Search text to filter orders |
|
|
946
|
-
|
|
947
|
-
#### Response
|
|
948
|
-
|
|
949
|
-
**Success (200):**
|
|
950
|
-
|
|
951
|
-
```
|
|
952
|
-
{
|
|
953
|
-
"orders": {
|
|
954
|
-
"total": 25,
|
|
955
|
-
"per_page": 10,
|
|
956
|
-
"current_page": 1,
|
|
957
|
-
"last_page": 3,
|
|
958
|
-
"data": [
|
|
959
|
-
{
|
|
960
|
-
"created_at": "2025-06-15 10:30:00",
|
|
961
|
-
"invoice_no": "INV-000101",
|
|
962
|
-
"total_amount": 4999,
|
|
963
|
-
"uuid": "abc-123-def",
|
|
964
|
-
"type": "one-time",
|
|
965
|
-
"status": "completed",
|
|
966
|
-
"renewals_count": 0,
|
|
967
|
-
"order_items": [
|
|
968
|
-
{
|
|
969
|
-
"id": 1,
|
|
970
|
-
"post_title": "Premium Plugin",
|
|
971
|
-
"title": "Premium Plugin - Single Site",
|
|
972
|
-
"quantity": 1,
|
|
973
|
-
"payment_type": "one-time",
|
|
974
|
-
"line_meta": {
|
|
975
|
-
"bundle_parent_item_id": null
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
]
|
|
979
|
-
}
|
|
980
|
-
]
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
```
|
|
984
|
-
|
|
985
|
-
> The `created_at` timestamp is converted to the user's timezone (stored in `order.config.user_tz`, falling back to the site timezone).
|
|
986
|
-
|
|
987
|
-
#### Example
|
|
988
|
-
|
|
989
|
-
```
|
|
990
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders?per_page=10&page=1&search=plugin" \
|
|
991
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
992
|
-
```
|
|
993
|
-
|
|
994
|
-
---
|
|
995
|
-
|
|
996
|
-
### Get Order Details
|
|
997
|
-
|
|
998
|
-
GET `/fluent-cart/v2/customer-profile/orders/{order_uuid}`
|
|
999
|
-
|
|
1000
|
-
Retrieve full details for a specific order including line items, transactions, subscriptions, downloads, and addresses. The order must belong to the authenticated customer.
|
|
1001
|
-
|
|
1002
|
-
#### Parameters
|
|
1003
|
-
|
|
1004
|
-
| Parameter | Type | Location | Required | Description |
|
|
1005
|
-
| --- | --- | --- | --- | --- |
|
|
1006
|
-
| `order_uuid` | string | path | Yes | The UUID of the order (alphanumeric with dashes) |
|
|
1007
|
-
|
|
1008
|
-
#### Response
|
|
1009
|
-
|
|
1010
|
-
**Success (200):**
|
|
1011
|
-
|
|
1012
|
-
```
|
|
1013
|
-
{
|
|
1014
|
-
"order": {
|
|
1015
|
-
"id": 101,
|
|
1016
|
-
"fulfillment_type": "digital",
|
|
1017
|
-
"type": "one-time",
|
|
1018
|
-
"created_at": "2025-06-15 10:30:00",
|
|
1019
|
-
"invoice_no": "INV-000101",
|
|
1020
|
-
"currency": "USD",
|
|
1021
|
-
"uuid": "abc-123-def",
|
|
1022
|
-
"status": "completed",
|
|
1023
|
-
"payment_status": "paid",
|
|
1024
|
-
"shipping_status": "",
|
|
1025
|
-
"billing_address_text": "John Doe, 123 Main St, New York, NY 10001, US",
|
|
1026
|
-
"shipping_address_text": "",
|
|
1027
|
-
"subtotal": 4999,
|
|
1028
|
-
"total_amount": 4999,
|
|
1029
|
-
"total_paid": 4999,
|
|
1030
|
-
"total_refund": 0,
|
|
1031
|
-
"shipping_total": 0,
|
|
1032
|
-
"coupon_discount_total": 0,
|
|
1033
|
-
"manual_discount_total": 0,
|
|
1034
|
-
"tax_total": 0,
|
|
1035
|
-
"tax_behavior": "exclusive",
|
|
1036
|
-
"shipping_tax": 0,
|
|
1037
|
-
"payment_method": "stripe",
|
|
1038
|
-
"order_items": [
|
|
1039
|
-
{
|
|
1040
|
-
"id": 1,
|
|
1041
|
-
"variation_id": 10,
|
|
1042
|
-
"product_id": 5,
|
|
1043
|
-
"post_title": "Premium Plugin",
|
|
1044
|
-
"title": "Premium Plugin - Single Site",
|
|
1045
|
-
"quantity": 1,
|
|
1046
|
-
"unit_price": 4999,
|
|
1047
|
-
"subtotal": 4999,
|
|
1048
|
-
"payment_type": "one-time",
|
|
1049
|
-
"meta_lines": [],
|
|
1050
|
-
"extra_amount": 0,
|
|
1051
|
-
"image": "https://example.com/wp-content/uploads/product.jpg",
|
|
1052
|
-
"variant_image": "",
|
|
1053
|
-
"url": "https://example.com/product/premium-plugin/",
|
|
1054
|
-
"line_meta": {},
|
|
1055
|
-
}
|
|
1056
|
-
],
|
|
1057
|
-
"subscriptions": [],
|
|
1058
|
-
"downloads": [
|
|
1059
|
-
{
|
|
1060
|
-
"file_size": "2.5 MB",
|
|
1061
|
-
"title": "premium-plugin-v2.zip",
|
|
1062
|
-
"download_url": "https://example.com/?fct_download=..."
|
|
1063
|
-
}
|
|
1064
|
-
],
|
|
1065
|
-
"transactions": [
|
|
1066
|
-
{
|
|
1067
|
-
"id": 50,
|
|
1068
|
-
"uuid": "txn-abc-123",
|
|
1069
|
-
"order_id": 101,
|
|
1070
|
-
"amount": 4999,
|
|
1071
|
-
"status": "succeeded",
|
|
1072
|
-
"payment_method": "stripe",
|
|
1073
|
-
"created_at": "2025-06-15 10:30:00"
|
|
1074
|
-
}
|
|
1075
|
-
]
|
|
1076
|
-
},
|
|
1077
|
-
"section_parts": {
|
|
1078
|
-
"before_summary": "",
|
|
1079
|
-
"after_summary": "",
|
|
1080
|
-
"after_licenses": "",
|
|
1081
|
-
"after_subscriptions": "",
|
|
1082
|
-
"after_downloads": "",
|
|
1083
|
-
"after_transactions": "",
|
|
1084
|
-
"end_of_order": ""
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
```
|
|
1088
|
-
|
|
1089
|
-
> The `section_parts` object contains HTML strings injected by extensions via the `fluent_cart/customer/order_details_section_parts` filter.
|
|
1090
|
-
|
|
1091
|
-
**Error (renewal order redirect):**
|
|
1092
|
-
|
|
1093
|
-
```
|
|
1094
|
-
{
|
|
1095
|
-
"message": "This is a renewal order. Please check the parent order details.",
|
|
1096
|
-
"parent_order": {
|
|
1097
|
-
"uuid": "parent-abc-123"
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
```
|
|
1101
|
-
|
|
1102
|
-
**Error (order not found):**
|
|
1103
|
-
|
|
1104
|
-
```
|
|
1105
|
-
{
|
|
1106
|
-
"message": "Order not found"
|
|
1107
|
-
}
|
|
1108
|
-
```
|
|
1109
|
-
|
|
1110
|
-
**Error (not logged in):**
|
|
1111
|
-
|
|
1112
|
-
```
|
|
1113
|
-
{
|
|
1114
|
-
"message": "You are not logged in"
|
|
1115
|
-
}
|
|
1116
|
-
```
|
|
1117
|
-
|
|
1118
|
-
#### Example
|
|
1119
|
-
|
|
1120
|
-
```
|
|
1121
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/abc-123-def" \
|
|
1122
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
1123
|
-
```
|
|
1124
|
-
|
|
1125
|
-
---
|
|
1126
|
-
|
|
1127
|
-
### Get Upgrade Paths
|
|
1128
|
-
|
|
1129
|
-
GET `/fluent-cart/v2/customer-profile/orders/{order_uuid}/upgrade-paths`
|
|
1130
|
-
|
|
1131
|
-
Retrieve available upgrade/downgrade paths for a specific product variation within an order. Used to show plan switching options in the customer portal.
|
|
1132
|
-
|
|
1133
|
-
#### Parameters
|
|
1134
|
-
|
|
1135
|
-
| Parameter | Type | Location | Required | Description |
|
|
1136
|
-
| --- | --- | --- | --- | --- |
|
|
1137
|
-
| `order_uuid` | string | path | Yes | The UUID of the order (alphanumeric with dashes) |
|
|
1138
|
-
| `variation_id` | integer | query | Yes | The product variation ID to find upgrade paths for |
|
|
1139
|
-
|
|
1140
|
-
#### Response
|
|
1141
|
-
|
|
1142
|
-
**Success (200):**
|
|
1143
|
-
|
|
1144
|
-
```
|
|
1145
|
-
{
|
|
1146
|
-
"upgradePaths": [
|
|
1147
|
-
{
|
|
1148
|
-
"variation_id": 15,
|
|
1149
|
-
"title": "Premium Plugin - 5 Sites",
|
|
1150
|
-
"price": 9999,
|
|
1151
|
-
"billing_interval": "year",
|
|
1152
|
-
"upgrade_type": "upgrade",
|
|
1153
|
-
"prorated_amount": 5000
|
|
1154
|
-
},
|
|
1155
|
-
{
|
|
1156
|
-
"variation_id": 20,
|
|
1157
|
-
"title": "Premium Plugin - Unlimited Sites",
|
|
1158
|
-
"price": 19999,
|
|
1159
|
-
"billing_interval": "year",
|
|
1160
|
-
"upgrade_type": "upgrade",
|
|
1161
|
-
"prorated_amount": 15000
|
|
1162
|
-
}
|
|
1163
|
-
]
|
|
1164
|
-
}
|
|
1165
|
-
```
|
|
1166
|
-
|
|
1167
|
-
**Error (not logged in):**
|
|
1168
|
-
|
|
1169
|
-
```
|
|
1170
|
-
{
|
|
1171
|
-
"message": "You must be logged in to view upgrade paths."
|
|
1172
|
-
}
|
|
1173
|
-
```
|
|
1174
|
-
|
|
1175
|
-
**Error (order not found):**
|
|
1176
|
-
|
|
1177
|
-
```
|
|
1178
|
-
{
|
|
1179
|
-
"message": "Order not found or you do not have permission to view it."
|
|
1180
|
-
}
|
|
1181
|
-
```
|
|
1182
|
-
|
|
1183
|
-
#### Example
|
|
1184
|
-
|
|
1185
|
-
```
|
|
1186
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/abc-123-def/upgrade-paths?variation_id=10" \
|
|
1187
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
1188
|
-
```
|
|
1189
|
-
|
|
1190
|
-
---
|
|
1191
|
-
|
|
1192
|
-
### Get Transaction Billing Address
|
|
1193
|
-
|
|
1194
|
-
GET `/fluent-cart/v2/customer-profile/orders/{transaction_uuid}/billing-address`
|
|
1195
|
-
|
|
1196
|
-
Retrieve the billing address associated with a specific transaction. Used for invoice/receipt editing in the customer portal.
|
|
1197
|
-
|
|
1198
|
-
#### Parameters
|
|
1199
|
-
|
|
1200
|
-
| Parameter | Type | Location | Required | Description |
|
|
1201
|
-
| --- | --- | --- | --- | --- |
|
|
1202
|
-
| `transaction_uuid` | string | path | Yes | The UUID of the transaction (alphanumeric with dashes) |
|
|
1203
|
-
|
|
1204
|
-
#### Response
|
|
1205
|
-
|
|
1206
|
-
**Success (200):**
|
|
1207
|
-
|
|
1208
|
-
```
|
|
1209
|
-
{
|
|
1210
|
-
"message": "Success",
|
|
1211
|
-
"data": {
|
|
1212
|
-
"address_1": "123 Main St",
|
|
1213
|
-
"address_2": "",
|
|
1214
|
-
"city": "New York",
|
|
1215
|
-
"state": "NY",
|
|
1216
|
-
"postcode": "10001",
|
|
1217
|
-
"country": "US",
|
|
1218
|
-
"name": "John Doe",
|
|
1219
|
-
"vat_tax_id": "EU123456789",
|
|
1220
|
-
"address_id": 15
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
```
|
|
1224
|
-
|
|
1225
|
-
**Success (200) - No billing address found:**
|
|
1226
|
-
|
|
1227
|
-
```
|
|
1228
|
-
{
|
|
1229
|
-
"message": "",
|
|
1230
|
-
"data": {
|
|
1231
|
-
"address_1": "",
|
|
1232
|
-
"address_2": "",
|
|
1233
|
-
"city": "",
|
|
1234
|
-
"state": "",
|
|
1235
|
-
"postcode": "",
|
|
1236
|
-
"country": "",
|
|
1237
|
-
"name": "",
|
|
1238
|
-
"vat_tax_id": "",
|
|
1239
|
-
"address_id": ""
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
```
|
|
1243
|
-
|
|
1244
|
-
**Error (customer not found):**
|
|
1245
|
-
|
|
1246
|
-
```
|
|
1247
|
-
{
|
|
1248
|
-
"message": "Customer not found"
|
|
1249
|
-
}
|
|
1250
|
-
```
|
|
1251
|
-
|
|
1252
|
-
**Error (transaction not found):**
|
|
1253
|
-
|
|
1254
|
-
```
|
|
1255
|
-
{
|
|
1256
|
-
"message": "Transaction not found"
|
|
1257
|
-
}
|
|
1258
|
-
```
|
|
1259
|
-
|
|
1260
|
-
**Error (order not found):**
|
|
1261
|
-
|
|
1262
|
-
```
|
|
1263
|
-
{
|
|
1264
|
-
"message": "Order not found"
|
|
1265
|
-
}
|
|
1266
|
-
```
|
|
1267
|
-
|
|
1268
|
-
#### Example
|
|
1269
|
-
|
|
1270
|
-
```
|
|
1271
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/txn-abc-123/billing-address" \
|
|
1272
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
1273
|
-
```
|
|
1274
|
-
|
|
1275
|
-
---
|
|
1276
|
-
|
|
1277
|
-
### Save Transaction Billing Address
|
|
1278
|
-
|
|
1279
|
-
PUT `/fluent-cart/v2/customer-profile/orders/{transaction_uuid}/billing-address`
|
|
1280
|
-
|
|
1281
|
-
Create or update the billing address for a specific transaction's order. Also stores the VAT/Tax ID as order metadata. Validates address fields against country-specific rules.
|
|
1282
|
-
|
|
1283
|
-
#### Parameters
|
|
1284
|
-
|
|
1285
|
-
| Parameter | Type | Location | Required | Description |
|
|
1286
|
-
| --- | --- | --- | --- | --- |
|
|
1287
|
-
| `transaction_uuid` | string | path | Yes | The UUID of the transaction (alphanumeric with dashes) |
|
|
1288
|
-
| `address_id` | string | body | No | Existing order address ID to update. If empty, a new address is created. |
|
|
1289
|
-
| `name` | string | body | Yes | Contact name |
|
|
1290
|
-
| `address_1` | string | body | Conditional | Primary street address. Required based on country validation rules. |
|
|
1291
|
-
| `address_2` | string | body | No | Secondary address line |
|
|
1292
|
-
| `city` | string | body | Conditional | City. Required based on country validation rules. |
|
|
1293
|
-
| `state` | string | body | Conditional | State/province code. Required for countries with states. |
|
|
1294
|
-
| `postcode` | string | body | Conditional | Postal/zip code. Validated against country-specific format. |
|
|
1295
|
-
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
1296
|
-
| `vat_tax_id` | string | body | No | VAT or Tax ID. Stored as order meta. |
|
|
1297
|
-
|
|
1298
|
-
#### Response
|
|
1299
|
-
|
|
1300
|
-
**Success (200) - Address created:**
|
|
1301
|
-
|
|
1302
|
-
```
|
|
1303
|
-
{
|
|
1304
|
-
"message": "Billing address created successfully",
|
|
1305
|
-
"address_id": 25
|
|
1306
|
-
}
|
|
1307
|
-
```
|
|
1308
|
-
|
|
1309
|
-
**Success (200) - Address updated:**
|
|
1310
|
-
|
|
1311
|
-
```
|
|
1312
|
-
{
|
|
1313
|
-
"message": "Billing address updated successfully",
|
|
1314
|
-
"formatted_address": "John Doe, 123 Main St, New York, NY 10001, US"
|
|
1315
|
-
}
|
|
1316
|
-
```
|
|
1317
|
-
|
|
1318
|
-
**Error (order not found):**
|
|
1319
|
-
|
|
1320
|
-
```
|
|
1321
|
-
{
|
|
1322
|
-
"message": "Order not found"
|
|
1323
|
-
}
|
|
1324
|
-
```
|
|
1325
|
-
|
|
1326
|
-
**Error (validation):**
|
|
1327
|
-
|
|
1328
|
-
```
|
|
1329
|
-
{
|
|
1330
|
-
"errors": {
|
|
1331
|
-
"country": ["The country field is required."]
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
```
|
|
1335
|
-
|
|
1336
|
-
#### Example
|
|
1337
|
-
|
|
1338
|
-
```
|
|
1339
|
-
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/txn-abc-123/billing-address" \
|
|
1340
|
-
-H "Content-Type: application/json" \
|
|
1341
|
-
-d '{
|
|
1342
|
-
"address_id": "15",
|
|
1343
|
-
"name": "John Doe",
|
|
1344
|
-
"address_1": "123 Main St",
|
|
1345
|
-
"city": "New York",
|
|
1346
|
-
"state": "NY",
|
|
1347
|
-
"postcode": "10001",
|
|
1348
|
-
"country": "US",
|
|
1349
|
-
"vat_tax_id": "EU123456789"
|
|
1350
|
-
}' \
|
|
1351
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
1352
|
-
```
|
|
1353
|
-
|
|
1354
|
-
---
|
|
1355
|
-
|
|
1356
|
-
## Downloads
|
|
1357
|
-
|
|
1358
|
-
Endpoints for accessing downloadable products from the customer portal.
|
|
1359
|
-
|
|
1360
|
-
### List Downloads
|
|
1361
|
-
|
|
1362
|
-
GET `/fluent-cart/v2/customer-profile/downloads`
|
|
1363
|
-
|
|
1364
|
-
Retrieve a paginated list of downloadable files available to the authenticated customer. Only includes downloads from orders with a successful payment status. Filters downloads based on purchased product variations.
|
|
1365
|
-
|
|
1366
|
-
#### Parameters
|
|
1367
|
-
|
|
1368
|
-
| Parameter | Type | Location | Required | Description |
|
|
1369
|
-
| --- | --- | --- | --- | --- |
|
|
1370
|
-
| `page` | integer | query | No | Page number for pagination (default: 1) |
|
|
1371
|
-
| `per_page` | integer | query | No | Number of items per page (default: 10) |
|
|
1372
|
-
|
|
1373
|
-
#### Response
|
|
1374
|
-
|
|
1375
|
-
**Success (200):**
|
|
1376
|
-
|
|
1377
|
-
```
|
|
1378
|
-
{
|
|
1379
|
-
"message": "Success",
|
|
1380
|
-
"downloads": {
|
|
1381
|
-
"data": [
|
|
1382
|
-
{
|
|
1383
|
-
"file_size": "2.5 MB",
|
|
1384
|
-
"title": "premium-plugin-v2.0.1.zip",
|
|
1385
|
-
"download_url": "https://example.com/?fct_download=eyJ0eXAi..."
|
|
1386
|
-
},
|
|
1387
|
-
{
|
|
1388
|
-
"file_size": "1.2 MB",
|
|
1389
|
-
"title": "starter-theme-v1.5.zip",
|
|
1390
|
-
"download_url": "https://example.com/?fct_download=eyJ0eXAi..."
|
|
1391
|
-
}
|
|
1392
|
-
],
|
|
1393
|
-
"total": 5,
|
|
1394
|
-
"per_page": 10,
|
|
1395
|
-
"current_page": 1,
|
|
1396
|
-
"last_page": 1
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
```
|
|
1400
|
-
|
|
1401
|
-
**Success (200) - Not logged in (empty result):**
|
|
1402
|
-
|
|
1403
|
-
```
|
|
1404
|
-
{
|
|
1405
|
-
"message": "Success",
|
|
1406
|
-
"downloads": {
|
|
1407
|
-
"data": [],
|
|
1408
|
-
"total": 0,
|
|
1409
|
-
"per_page": 10,
|
|
1410
|
-
"current_page": 1,
|
|
1411
|
-
"last_page": 1
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
```
|
|
1415
|
-
|
|
1416
|
-
> The `download_url` contains a signed/encoded token that authorizes the download. These URLs are generated by `Helper::generateDownloadFileLink()` and are time-limited.
|
|
1417
|
-
|
|
1418
|
-
#### Example
|
|
1419
|
-
|
|
1420
|
-
```
|
|
1421
|
-
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/downloads?per_page=20&page=1" \
|
|
1422
|
-
--cookie "wordpress_logged_in_xxx=..."
|
|
1423
|
-
```
|
|
1
|
+
# Customer Profile API
|
|
2
|
+
|
|
3
|
+
Customer-facing endpoints for managing profiles, viewing orders, handling addresses, and accessing downloads. These endpoints are used by the storefront customer portal.
|
|
4
|
+
|
|
5
|
+
**Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
|
|
6
|
+
|
|
7
|
+
**Policy:** `CustomerFrontendPolicy` (requires authenticated customer)
|
|
8
|
+
|
|
9
|
+
> These are frontend endpoints accessed by logged-in customers, not admin users. The policy checks `is_user_logged_in()` and each endpoint verifies that the authenticated user matches the requested customer record.
|
|
10
|
+
|
|
11
|
+
> All monetary values are in **cents** (e.g., `$10.00` = `1000`).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Customer Management
|
|
16
|
+
|
|
17
|
+
Endpoints under the `customers` prefix for retrieving and updating the current customer's details.
|
|
18
|
+
|
|
19
|
+
### Get Customer Details
|
|
20
|
+
|
|
21
|
+
GET `/fluent-cart/v2/customers/{customerId}`
|
|
22
|
+
|
|
23
|
+
Retrieve the details of the currently authenticated customer. The `customerId` must match the logged-in customer's record.
|
|
24
|
+
|
|
25
|
+
#### Parameters
|
|
26
|
+
|
|
27
|
+
| Parameter | Type | Location | Required | Description |
|
|
28
|
+
| --- | --- | --- | --- | --- |
|
|
29
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
30
|
+
| `with` | array | query | No | Relationships to eager-load (e.g., `billing_address`, `shipping_address`, `orders`) |
|
|
31
|
+
|
|
32
|
+
#### Response
|
|
33
|
+
|
|
34
|
+
**Success (200):**
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
{
|
|
38
|
+
"customer": {
|
|
39
|
+
"id": 1,
|
|
40
|
+
"user_id": 5,
|
|
41
|
+
"email": "[email protected]",
|
|
42
|
+
"first_name": "John",
|
|
43
|
+
"last_name": "Doe",
|
|
44
|
+
"status": "active",
|
|
45
|
+
"purchase_value": {},
|
|
46
|
+
"purchase_count": 3,
|
|
47
|
+
"ltv": 15000,
|
|
48
|
+
"country": "US",
|
|
49
|
+
"city": "New York",
|
|
50
|
+
"state": "NY",
|
|
51
|
+
"postcode": "10001",
|
|
52
|
+
"created_at": "2025-01-10 08:00:00",
|
|
53
|
+
"updated_at": "2025-06-20 14:00:00"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Error (403):**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
{
|
|
62
|
+
"message": "You are not authorized to view this customer"
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Example
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/1?with[]=billing_address" \
|
|
70
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Update Customer Details
|
|
76
|
+
|
|
77
|
+
PUT `/fluent-cart/v2/customers/{customerId}`
|
|
78
|
+
|
|
79
|
+
Update the authenticated customer's profile details. The `customerId` must match the logged-in customer's record.
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Location | Required | Description |
|
|
84
|
+
| --- | --- | --- | --- | --- |
|
|
85
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
86
|
+
| `email` | string | body | Yes | Customer email address. Must be unique and valid. Max 255 characters. |
|
|
87
|
+
| `first_name` | string | body | Conditional | Customer first name. Required when store uses separate name fields. Max 255 characters. |
|
|
88
|
+
| `last_name` | string | body | No | Customer last name. Max 255 characters. |
|
|
89
|
+
| `full_name` | string | body | Conditional | Customer full name. Required when store uses full name mode. Max 255 characters. |
|
|
90
|
+
| `city` | string | body | No | Customer city |
|
|
91
|
+
| `state` | string | body | No | Customer state/province code |
|
|
92
|
+
| `postcode` | string | body | No | Customer postal/zip code |
|
|
93
|
+
| `country` | string | body | No | Customer country code (e.g., `US`, `GB`) |
|
|
94
|
+
| `notes` | string | body | No | Internal notes about the customer |
|
|
95
|
+
| `status` | string | body | No | Customer status |
|
|
96
|
+
|
|
97
|
+
#### Response
|
|
98
|
+
|
|
99
|
+
**Success (200):**
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
{
|
|
103
|
+
"message": "Customer updated successfully!",
|
|
104
|
+
"data": {
|
|
105
|
+
"id": 1,
|
|
106
|
+
"email": "[email protected]",
|
|
107
|
+
"first_name": "John",
|
|
108
|
+
"last_name": "Doe"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Error (403):**
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
{
|
|
117
|
+
"message": "You are not authorized to update this customer"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Example
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customers/1" \
|
|
125
|
+
-H "Content-Type: application/json" \
|
|
126
|
+
-d '{"first_name": "John", "last_name": "Smith", "email": "[email protected]"}' \
|
|
127
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Get Customer Orders (Customer Prefix)
|
|
133
|
+
|
|
134
|
+
GET `/fluent-cart/v2/customers/{customerId}/orders`
|
|
135
|
+
|
|
136
|
+
Retrieve a paginated list of orders for the specified customer. The `customerId` must match the logged-in user.
|
|
137
|
+
|
|
138
|
+
#### Parameters
|
|
139
|
+
|
|
140
|
+
| Parameter | Type | Location | Required | Description |
|
|
141
|
+
| --- | --- | --- | --- | --- |
|
|
142
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
143
|
+
| `per_page` | integer | query | No | Number of items per page (default: 15) |
|
|
144
|
+
|
|
145
|
+
#### Response
|
|
146
|
+
|
|
147
|
+
**Success (200):**
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
{
|
|
151
|
+
"orders": {
|
|
152
|
+
"total": 25,
|
|
153
|
+
"per_page": 15,
|
|
154
|
+
"current_page": 1,
|
|
155
|
+
"last_page": 2,
|
|
156
|
+
"data": [
|
|
157
|
+
{
|
|
158
|
+
"id": 101,
|
|
159
|
+
"invoice_no": "INV-000101",
|
|
160
|
+
"total_amount": 4999,
|
|
161
|
+
"uuid": "abc-123-def",
|
|
162
|
+
"type": "one-time",
|
|
163
|
+
"status": "completed",
|
|
164
|
+
"created_at": "2025-06-15 10:30:00"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Error (returns empty when unauthorized):**
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
{
|
|
175
|
+
"orders": []
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Example
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/1/orders?per_page=10" \
|
|
183
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Address Management (Customer Prefix)
|
|
189
|
+
|
|
190
|
+
Endpoints under the `customers` prefix for managing customer addresses during checkout and in the customer account.
|
|
191
|
+
|
|
192
|
+
### Select Address for Checkout
|
|
193
|
+
|
|
194
|
+
GET `/fluent-cart/v2/customers/{customerAddressId}/update-address-select`
|
|
195
|
+
|
|
196
|
+
Select an existing address and apply it to the current cart/checkout session. Updates the cart's checkout data with the selected address and returns the rendered address HTML along with updated checkout fragments.
|
|
197
|
+
|
|
198
|
+
#### Parameters
|
|
199
|
+
|
|
200
|
+
| Parameter | Type | Location | Required | Description |
|
|
201
|
+
| --- | --- | --- | --- | --- |
|
|
202
|
+
| `customerAddressId` | integer | path | Yes | The address record ID to select |
|
|
203
|
+
| `with` | array | query | No | Relationships to eager-load on the address |
|
|
204
|
+
| `fct_cart_hash` | string | query | No | Cart hash identifier to locate the active cart session |
|
|
205
|
+
|
|
206
|
+
#### Response
|
|
207
|
+
|
|
208
|
+
**Success (200):**
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
{
|
|
212
|
+
"message": "Address Attached",
|
|
213
|
+
"data": "<div class=\"fct-address-info\">...</div>",
|
|
214
|
+
"fragments": {
|
|
215
|
+
".fct-checkout-summary": "<div>...updated summary HTML...</div>"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Error (404):**
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
{
|
|
224
|
+
"message": "Address not found"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Error (403):**
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
{
|
|
232
|
+
"message": "You are not authorized to view this address"
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### Example
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customers/5/update-address-select?fct_cart_hash=abc123" \
|
|
240
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### Create Address (Checkout)
|
|
246
|
+
|
|
247
|
+
POST `/fluent-cart/v2/customers/add-address`
|
|
248
|
+
|
|
249
|
+
Create a new address for the currently authenticated customer. Used during checkout to add a new billing or shipping address. After creation, returns updated address selector HTML for the checkout form.
|
|
250
|
+
|
|
251
|
+
#### Parameters
|
|
252
|
+
|
|
253
|
+
| Parameter | Type | Location | Required | Description |
|
|
254
|
+
| --- | --- | --- | --- | --- |
|
|
255
|
+
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
256
|
+
| `product_type` | string | body | No | Product fulfillment type (e.g., `physical`, `digital`). Used for field validation rules. |
|
|
257
|
+
| `label` | string | body | No | Short label for the address (max 15 characters, e.g., `Home`, `Office`) |
|
|
258
|
+
| `billing_name` or `shipping_name` | string | body | No | Contact name (prefixed with address type) |
|
|
259
|
+
| `billing_address_1` or `shipping_address_1` | string | body | Yes | Primary street address (prefixed with address type) |
|
|
260
|
+
| `billing_address_2` or `shipping_address_2` | string | body | No | Secondary address line (prefixed with address type) |
|
|
261
|
+
| `billing_city` or `shipping_city` | string | body | Yes | City (prefixed with address type) |
|
|
262
|
+
| `billing_state` or `shipping_state` | string | body | Conditional | State/province code. Required if the country has states. (prefixed with address type) |
|
|
263
|
+
| `billing_postcode` or `shipping_postcode` | string | body | Conditional | Postal/zip code. Validated against country format. (prefixed with address type) |
|
|
264
|
+
| `billing_country` or `shipping_country` | string | body | Yes | Country code (e.g., `US`, `GB`). (prefixed with address type) |
|
|
265
|
+
| `billing_phone` or `shipping_phone` | string | body | No | Phone number (prefixed with address type) |
|
|
266
|
+
| `billing_email` or `shipping_email` | string | body | No | Email address (prefixed with address type) |
|
|
267
|
+
|
|
268
|
+
> **Note:** All address fields are prefixed with the address `type` (e.g., `billing_address_1` for a billing address, `shipping_city` for shipping). The prefix is stripped before storage.
|
|
269
|
+
|
|
270
|
+
#### Response
|
|
271
|
+
|
|
272
|
+
**Success (200):**
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
{
|
|
276
|
+
"message": "Customer address created successfully!",
|
|
277
|
+
"fragment": [
|
|
278
|
+
{
|
|
279
|
+
"selector": "[data-fluent-cart-checkout-page-form-address-modal-address-selector-button-wrapper]",
|
|
280
|
+
"content": "<div>...updated address selector HTML...</div>",
|
|
281
|
+
"type": "replace"
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Error (422 - validation):**
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
{
|
|
291
|
+
"status": "failed",
|
|
292
|
+
"errors": {
|
|
293
|
+
"billing_country": {
|
|
294
|
+
"required": "Country is required."
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Error (no customer):**
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
{
|
|
304
|
+
"message": "You don't have any associated account"
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Example
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customers/add-address" \
|
|
312
|
+
-H "Content-Type: application/json" \
|
|
313
|
+
-d '{
|
|
314
|
+
"type": "billing",
|
|
315
|
+
"billing_name": "John Doe",
|
|
316
|
+
"billing_address_1": "123 Main St",
|
|
317
|
+
"billing_city": "New York",
|
|
318
|
+
"billing_state": "NY",
|
|
319
|
+
"billing_postcode": "10001",
|
|
320
|
+
"billing_country": "US",
|
|
321
|
+
"billing_phone": "+1234567890",
|
|
322
|
+
"label": "Home"
|
|
323
|
+
}' \
|
|
324
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
### Update Address (Checkout)
|
|
330
|
+
|
|
331
|
+
PUT `/fluent-cart/v2/customers/{customerId}/address`
|
|
332
|
+
|
|
333
|
+
Update an existing address for the authenticated customer. The address ID is passed in the request body.
|
|
334
|
+
|
|
335
|
+
#### Parameters
|
|
336
|
+
|
|
337
|
+
| Parameter | Type | Location | Required | Description |
|
|
338
|
+
| --- | --- | --- | --- | --- |
|
|
339
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
340
|
+
| `address.id` | integer | body | Yes | The address record ID to update |
|
|
341
|
+
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
342
|
+
| `billing_label` or `shipping_label` | string | body | Yes | Short label (max 15 characters). Prefixed with address type. |
|
|
343
|
+
| `billing_name` or `shipping_name` | string | body | No | Contact name (prefixed with address type) |
|
|
344
|
+
| `billing_address_1` or `shipping_address_1` | string | body | Yes | Primary street address (prefixed with address type) |
|
|
345
|
+
| `billing_address_2` or `shipping_address_2` | string | body | No | Secondary address line (prefixed with address type) |
|
|
346
|
+
| `billing_city` or `shipping_city` | string | body | Yes | City (prefixed with address type) |
|
|
347
|
+
| `billing_state` or `shipping_state` | string | body | Conditional | State/province code (prefixed with address type) |
|
|
348
|
+
| `billing_postcode` or `shipping_postcode` | string | body | Conditional | Postal/zip code (prefixed with address type) |
|
|
349
|
+
| `billing_country` or `shipping_country` | string | body | Yes | Country code (prefixed with address type) |
|
|
350
|
+
|
|
351
|
+
#### Response
|
|
352
|
+
|
|
353
|
+
**Success (200):**
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
{
|
|
357
|
+
"message": "Address updated successfully"
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Error (403):**
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
{
|
|
365
|
+
"message": "You are not authorized to update this address"
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
#### Example
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customers/1/address" \
|
|
373
|
+
-H "Content-Type: application/json" \
|
|
374
|
+
-d '{
|
|
375
|
+
"type": "billing",
|
|
376
|
+
"address": {"id": 5},
|
|
377
|
+
"billing_name": "John Doe",
|
|
378
|
+
"billing_address_1": "456 Oak Ave",
|
|
379
|
+
"billing_city": "Boston",
|
|
380
|
+
"billing_state": "MA",
|
|
381
|
+
"billing_postcode": "02101",
|
|
382
|
+
"billing_country": "US",
|
|
383
|
+
"billing_label": "Work"
|
|
384
|
+
}' \
|
|
385
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### Delete Address (Checkout)
|
|
391
|
+
|
|
392
|
+
DELETE `/fluent-cart/v2/customers/{customerId}/address`
|
|
393
|
+
|
|
394
|
+
Delete an existing address for the authenticated customer. The address ID is passed in the request body.
|
|
395
|
+
|
|
396
|
+
#### Parameters
|
|
397
|
+
|
|
398
|
+
| Parameter | Type | Location | Required | Description |
|
|
399
|
+
| --- | --- | --- | --- | --- |
|
|
400
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
401
|
+
| `address.id` | integer | body | Yes | The address record ID to delete |
|
|
402
|
+
|
|
403
|
+
#### Response
|
|
404
|
+
|
|
405
|
+
**Success (200):**
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
{
|
|
409
|
+
"message": "Address deleted successfully"
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Error (403):**
|
|
414
|
+
|
|
415
|
+
```
|
|
416
|
+
{
|
|
417
|
+
"message": "You are not authorized to delete this address"
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
#### Example
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/customers/1/address" \
|
|
425
|
+
-H "Content-Type: application/json" \
|
|
426
|
+
-d '{"address": {"id": 5}}' \
|
|
427
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
### Set Address as Primary
|
|
433
|
+
|
|
434
|
+
POST `/fluent-cart/v2/customers/{customerId}/address/make-primary`
|
|
435
|
+
|
|
436
|
+
Mark a specific address as the primary address for its type (billing or shipping). All other addresses of the same type are demoted.
|
|
437
|
+
|
|
438
|
+
#### Parameters
|
|
439
|
+
|
|
440
|
+
| Parameter | Type | Location | Required | Description |
|
|
441
|
+
| --- | --- | --- | --- | --- |
|
|
442
|
+
| `customerId` | integer | path | Yes | The customer ID. Must belong to the authenticated user. |
|
|
443
|
+
| `address.id` | integer | body | Yes | The address record ID to set as primary |
|
|
444
|
+
| `address.type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
445
|
+
|
|
446
|
+
#### Response
|
|
447
|
+
|
|
448
|
+
**Success (200):**
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
{
|
|
452
|
+
"message": "Address successfully set as the primary"
|
|
453
|
+
}
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Error (403):**
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
{
|
|
460
|
+
"message": "You are not authorized to update this address"
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
#### Example
|
|
465
|
+
|
|
466
|
+
```
|
|
467
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customers/1/address/make-primary" \
|
|
468
|
+
-H "Content-Type: application/json" \
|
|
469
|
+
-d '{"address": {"id": 5, "type": "billing"}}' \
|
|
470
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## Profile Management
|
|
476
|
+
|
|
477
|
+
Endpoints under the `customer-profile` prefix for the customer portal dashboard and profile settings.
|
|
478
|
+
|
|
479
|
+
### Dashboard Overview
|
|
480
|
+
|
|
481
|
+
GET `/fluent-cart/v2/customer-profile/`
|
|
482
|
+
|
|
483
|
+
Retrieve the customer's dashboard overview including the 5 most recent orders. This is the landing page data for the customer portal.
|
|
484
|
+
|
|
485
|
+
#### Parameters
|
|
486
|
+
|
|
487
|
+
No parameters required.
|
|
488
|
+
|
|
489
|
+
#### Response
|
|
490
|
+
|
|
491
|
+
**Success (200):**
|
|
492
|
+
|
|
493
|
+
```
|
|
494
|
+
{
|
|
495
|
+
"message": "Success",
|
|
496
|
+
"dashboard_data": {
|
|
497
|
+
"orders": [
|
|
498
|
+
{
|
|
499
|
+
"created_at": "2025-06-15 10:30:00",
|
|
500
|
+
"invoice_no": "INV-000101",
|
|
501
|
+
"total_amount": 4999,
|
|
502
|
+
"uuid": "abc-123-def",
|
|
503
|
+
"type": "one-time",
|
|
504
|
+
"status": "completed",
|
|
505
|
+
"renewals_count": 0,
|
|
506
|
+
"order_items": [
|
|
507
|
+
{
|
|
508
|
+
"id": 1,
|
|
509
|
+
"post_title": "Premium Plugin",
|
|
510
|
+
"title": "Premium Plugin - Single Site",
|
|
511
|
+
"quantity": 1,
|
|
512
|
+
"payment_type": "one-time",
|
|
513
|
+
"line_meta": {
|
|
514
|
+
"bundle_parent_item_id": null
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"sections_parts": {
|
|
522
|
+
"before_orders_table": "",
|
|
523
|
+
"after_orders_table": ""
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
> The `sections_parts` object contains HTML strings injected by extensions via the `fluent_cart/customer_dashboard_data` filter.
|
|
529
|
+
|
|
530
|
+
#### Example
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/" \
|
|
534
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
### Get Profile Details
|
|
540
|
+
|
|
541
|
+
GET `/fluent-cart/v2/customer-profile/profile`
|
|
542
|
+
|
|
543
|
+
Retrieve the authenticated customer's profile details including name, email, and associated addresses. If the logged-in user does not yet have a customer record, basic WordPress user data is returned instead.
|
|
544
|
+
|
|
545
|
+
#### Parameters
|
|
546
|
+
|
|
547
|
+
No parameters required.
|
|
548
|
+
|
|
549
|
+
#### Response
|
|
550
|
+
|
|
551
|
+
**Success (200) - Existing customer:**
|
|
552
|
+
|
|
553
|
+
```
|
|
554
|
+
{
|
|
555
|
+
"message": "Success",
|
|
556
|
+
"data": {
|
|
557
|
+
"first_name": "John",
|
|
558
|
+
"last_name": "Doe",
|
|
559
|
+
"email": "[email protected]",
|
|
560
|
+
"billing_address": [
|
|
561
|
+
{
|
|
562
|
+
"id": 1,
|
|
563
|
+
"customer_id": 1,
|
|
564
|
+
"type": "billing",
|
|
565
|
+
"name": "John Doe",
|
|
566
|
+
"address_1": "123 Main St",
|
|
567
|
+
"address_2": "",
|
|
568
|
+
"city": "New York",
|
|
569
|
+
"state": "NY",
|
|
570
|
+
"postcode": "10001",
|
|
571
|
+
"country": "US",
|
|
572
|
+
"is_primary": "1",
|
|
573
|
+
"status": "active"
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
"shipping_address": []
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
**Success (200) - User without customer record:**
|
|
582
|
+
|
|
583
|
+
```
|
|
584
|
+
{
|
|
585
|
+
"message": "Success",
|
|
586
|
+
"data": {
|
|
587
|
+
"first_name": "Jane",
|
|
588
|
+
"last_name": "Smith",
|
|
589
|
+
"user_login": "janesmith",
|
|
590
|
+
"user_email": "[email protected]",
|
|
591
|
+
"email": "[email protected]",
|
|
592
|
+
"user_nicename": "janesmith",
|
|
593
|
+
"display_name": "Jane Smith",
|
|
594
|
+
"billing_address": [],
|
|
595
|
+
"shipping_address": [],
|
|
596
|
+
"not_a_customer": true
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
#### Example
|
|
602
|
+
|
|
603
|
+
```
|
|
604
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/profile" \
|
|
605
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
### Update Profile Details
|
|
611
|
+
|
|
612
|
+
POST `/fluent-cart/v2/customer-profile/update`
|
|
613
|
+
|
|
614
|
+
Update the authenticated customer's profile name. Also updates the associated WordPress user's `first_name`, `last_name`, and `display_name`.
|
|
615
|
+
|
|
616
|
+
#### Parameters
|
|
617
|
+
|
|
618
|
+
| Parameter | Type | Location | Required | Description |
|
|
619
|
+
| --- | --- | --- | --- | --- |
|
|
620
|
+
| `first_name` | string | body | No | Customer first name. Max 255 characters. |
|
|
621
|
+
| `last_name` | string | body | No | Customer last name. Max 255 characters. |
|
|
622
|
+
| `email` | string | body | Yes | Customer email address. Must be valid. |
|
|
623
|
+
| `current_password` | string | body | No | Current password (for password change flow) |
|
|
624
|
+
| `new_password` | string | body | No | New password (for password change flow) |
|
|
625
|
+
| `confirm_new_password` | string | body | No | Confirm new password (for password change flow) |
|
|
626
|
+
|
|
627
|
+
#### Response
|
|
628
|
+
|
|
629
|
+
**Success (200):**
|
|
630
|
+
|
|
631
|
+
```
|
|
632
|
+
{
|
|
633
|
+
"message": "Profile updated successfully"
|
|
634
|
+
}
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
**Error (customer not found):**
|
|
638
|
+
|
|
639
|
+
```
|
|
640
|
+
{
|
|
641
|
+
"message": "Customer not found"
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**Error (not logged in):**
|
|
646
|
+
|
|
647
|
+
```
|
|
648
|
+
{
|
|
649
|
+
"message": "You are not logged in"
|
|
650
|
+
}
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
#### Example
|
|
654
|
+
|
|
655
|
+
```
|
|
656
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/update" \
|
|
657
|
+
-H "Content-Type: application/json" \
|
|
658
|
+
-d '{"first_name": "John", "last_name": "Smith", "email": "[email protected]"}' \
|
|
659
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
---
|
|
663
|
+
|
|
664
|
+
## Address Management (Profile)
|
|
665
|
+
|
|
666
|
+
Endpoints under the `customer-profile` prefix for managing addresses from the customer portal profile page. These use a simpler interface compared to the checkout address endpoints.
|
|
667
|
+
|
|
668
|
+
### Create Profile Address
|
|
669
|
+
|
|
670
|
+
POST `/fluent-cart/v2/customer-profile/create-address`
|
|
671
|
+
|
|
672
|
+
Create a new address for the authenticated customer from the profile management page.
|
|
673
|
+
|
|
674
|
+
#### Parameters
|
|
675
|
+
|
|
676
|
+
| Parameter | Type | Location | Required | Description |
|
|
677
|
+
| --- | --- | --- | --- | --- |
|
|
678
|
+
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
679
|
+
| `name` | string | body | Yes | Contact name. Max 255 characters. |
|
|
680
|
+
| `label` | string | body | No | Short label for the address (max 15 characters, e.g., `Home`, `Work`) |
|
|
681
|
+
| `address_1` | string | body | No | Primary street address |
|
|
682
|
+
| `address_2` | string | body | No | Secondary address line |
|
|
683
|
+
| `city` | string | body | No | City. Max 255 characters. |
|
|
684
|
+
| `state` | string | body | No | State/province code. Max 255 characters. |
|
|
685
|
+
| `postcode` | string | body | Yes | Postal/zip code |
|
|
686
|
+
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
687
|
+
| `phone` | string | body | No | Phone number |
|
|
688
|
+
| `email` | string | body | Yes | Email address |
|
|
689
|
+
| `company_name` | string | body | No | Company name. Max 255 characters. |
|
|
690
|
+
| `is_primary` | integer | body | No | Set to `1` to make this the primary address. Defaults to `0`. Automatically set to `1` if no primary address exists. |
|
|
691
|
+
|
|
692
|
+
#### Response
|
|
693
|
+
|
|
694
|
+
**Success (200):**
|
|
695
|
+
|
|
696
|
+
```
|
|
697
|
+
{
|
|
698
|
+
"message": "Customer address created successfully!",
|
|
699
|
+
"data": {
|
|
700
|
+
"is_created": {
|
|
701
|
+
"id": 10,
|
|
702
|
+
"customer_id": 1,
|
|
703
|
+
"type": "billing",
|
|
704
|
+
"name": "John Doe",
|
|
705
|
+
"address_1": "123 Main St",
|
|
706
|
+
"city": "New York",
|
|
707
|
+
"state": "NY",
|
|
708
|
+
"postcode": "10001",
|
|
709
|
+
"country": "US",
|
|
710
|
+
"is_primary": "1",
|
|
711
|
+
"status": "active"
|
|
712
|
+
},
|
|
713
|
+
"total_address_count": 2
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
**Error (validation):**
|
|
719
|
+
|
|
720
|
+
```
|
|
721
|
+
{
|
|
722
|
+
"message": "Name field is required."
|
|
723
|
+
}
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
#### Example
|
|
727
|
+
|
|
728
|
+
```
|
|
729
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/create-address" \
|
|
730
|
+
-H "Content-Type: application/json" \
|
|
731
|
+
-d '{
|
|
732
|
+
"type": "billing",
|
|
733
|
+
"name": "John Doe",
|
|
734
|
+
"address_1": "123 Main St",
|
|
735
|
+
"city": "New York",
|
|
736
|
+
"state": "NY",
|
|
737
|
+
"postcode": "10001",
|
|
738
|
+
"country": "US",
|
|
739
|
+
"phone": "+1234567890",
|
|
740
|
+
"email": "[email protected]",
|
|
741
|
+
"label": "Home"
|
|
742
|
+
}' \
|
|
743
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
### Update Profile Address
|
|
749
|
+
|
|
750
|
+
POST `/fluent-cart/v2/customer-profile/edit-address`
|
|
751
|
+
|
|
752
|
+
Update an existing address from the profile management page. The address must belong to the authenticated customer.
|
|
753
|
+
|
|
754
|
+
#### Parameters
|
|
755
|
+
|
|
756
|
+
| Parameter | Type | Location | Required | Description |
|
|
757
|
+
| --- | --- | --- | --- | --- |
|
|
758
|
+
| `id` | integer | body | Yes | The address record ID to update |
|
|
759
|
+
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
760
|
+
| `name` | string | body | Yes | Contact name. Max 255 characters. |
|
|
761
|
+
| `label` | string | body | No | Short label (max 15 characters) |
|
|
762
|
+
| `address_1` | string | body | No | Primary street address |
|
|
763
|
+
| `address_2` | string | body | No | Secondary address line |
|
|
764
|
+
| `city` | string | body | No | City. Max 255 characters. |
|
|
765
|
+
| `state` | string | body | No | State/province code. Max 255 characters. |
|
|
766
|
+
| `postcode` | string | body | Yes | Postal/zip code |
|
|
767
|
+
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
768
|
+
| `phone` | string | body | No | Phone number |
|
|
769
|
+
| `email` | string | body | Yes | Email address |
|
|
770
|
+
| `company_name` | string | body | No | Company name. Max 255 characters. |
|
|
771
|
+
|
|
772
|
+
#### Response
|
|
773
|
+
|
|
774
|
+
**Success (200):**
|
|
775
|
+
|
|
776
|
+
```
|
|
777
|
+
{
|
|
778
|
+
"message": "Customer address updated successfully!",
|
|
779
|
+
"data": {
|
|
780
|
+
"id": 5,
|
|
781
|
+
"customer_id": 1,
|
|
782
|
+
"type": "billing",
|
|
783
|
+
"name": "John Smith",
|
|
784
|
+
"address_1": "456 Oak Ave",
|
|
785
|
+
"city": "Boston",
|
|
786
|
+
"state": "MA",
|
|
787
|
+
"postcode": "02101",
|
|
788
|
+
"country": "US"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
**Error (403):**
|
|
794
|
+
|
|
795
|
+
```
|
|
796
|
+
{
|
|
797
|
+
"message": "You are not authorized to update this address"
|
|
798
|
+
}
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
#### Example
|
|
802
|
+
|
|
803
|
+
```
|
|
804
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/edit-address" \
|
|
805
|
+
-H "Content-Type: application/json" \
|
|
806
|
+
-d '{
|
|
807
|
+
"id": 5,
|
|
808
|
+
"type": "billing",
|
|
809
|
+
"name": "John Smith",
|
|
810
|
+
"address_1": "456 Oak Ave",
|
|
811
|
+
"city": "Boston",
|
|
812
|
+
"state": "MA",
|
|
813
|
+
"postcode": "02101",
|
|
814
|
+
"country": "US",
|
|
815
|
+
"email": "[email protected]"
|
|
816
|
+
}' \
|
|
817
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
### Make Profile Address Primary
|
|
823
|
+
|
|
824
|
+
POST `/fluent-cart/v2/customer-profile/make-primary-address`
|
|
825
|
+
|
|
826
|
+
Set a specific address as the primary address for its type. All other addresses of the same type for the customer are demoted.
|
|
827
|
+
|
|
828
|
+
#### Parameters
|
|
829
|
+
|
|
830
|
+
| Parameter | Type | Location | Required | Description |
|
|
831
|
+
| --- | --- | --- | --- | --- |
|
|
832
|
+
| `addressId` | integer | body | Yes | The address record ID to set as primary |
|
|
833
|
+
| `type` | string | body | Yes | Address type: `billing` or `shipping` |
|
|
834
|
+
|
|
835
|
+
#### Response
|
|
836
|
+
|
|
837
|
+
**Success (200):**
|
|
838
|
+
|
|
839
|
+
```
|
|
840
|
+
{
|
|
841
|
+
"message": "Address successfully set as the primary"
|
|
842
|
+
}
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
**Error (403):**
|
|
846
|
+
|
|
847
|
+
```
|
|
848
|
+
{
|
|
849
|
+
"message": "You are not authorized to update this address"
|
|
850
|
+
}
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
#### Example
|
|
854
|
+
|
|
855
|
+
```
|
|
856
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/make-primary-address" \
|
|
857
|
+
-H "Content-Type: application/json" \
|
|
858
|
+
-d '{"addressId": 5, "type": "billing"}' \
|
|
859
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
### Delete Profile Address
|
|
865
|
+
|
|
866
|
+
POST `/fluent-cart/v2/customer-profile/delete-address`
|
|
867
|
+
|
|
868
|
+
Delete an address from the customer's profile. The address must belong to the authenticated customer. Primary addresses and the last remaining address cannot be deleted.
|
|
869
|
+
|
|
870
|
+
#### Parameters
|
|
871
|
+
|
|
872
|
+
| Parameter | Type | Location | Required | Description |
|
|
873
|
+
| --- | --- | --- | --- | --- |
|
|
874
|
+
| `addressId` | integer | body | Yes | The address record ID to delete |
|
|
875
|
+
|
|
876
|
+
#### Response
|
|
877
|
+
|
|
878
|
+
**Success (200):**
|
|
879
|
+
|
|
880
|
+
```
|
|
881
|
+
{
|
|
882
|
+
"message": "Address successfully deleted."
|
|
883
|
+
}
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
**Error (address is primary):**
|
|
887
|
+
|
|
888
|
+
```
|
|
889
|
+
{
|
|
890
|
+
"message": "Primary address cannot be deleted!"
|
|
891
|
+
}
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
**Error (last address):**
|
|
895
|
+
|
|
896
|
+
```
|
|
897
|
+
{
|
|
898
|
+
"message": "At least one address must remain. Address deletion failed!"
|
|
899
|
+
}
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
**Error (403):**
|
|
903
|
+
|
|
904
|
+
```
|
|
905
|
+
{
|
|
906
|
+
"message": "You are not authorized to update this address"
|
|
907
|
+
}
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
**Error (missing ID):**
|
|
911
|
+
|
|
912
|
+
```
|
|
913
|
+
{
|
|
914
|
+
"message": "Address ID is required"
|
|
915
|
+
}
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
#### Example
|
|
919
|
+
|
|
920
|
+
```
|
|
921
|
+
curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/delete-address" \
|
|
922
|
+
-H "Content-Type: application/json" \
|
|
923
|
+
-d '{"addressId": 5}' \
|
|
924
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
---
|
|
928
|
+
|
|
929
|
+
## Orders
|
|
930
|
+
|
|
931
|
+
Endpoints under the `customer-profile` prefix for viewing orders and managing order-related data in the customer portal.
|
|
932
|
+
|
|
933
|
+
### List Orders
|
|
934
|
+
|
|
935
|
+
GET `/fluent-cart/v2/customer-profile/orders`
|
|
936
|
+
|
|
937
|
+
Retrieve a paginated list of the authenticated customer's orders. Excludes renewal orders that have a parent subscription order. Supports text search across order fields.
|
|
938
|
+
|
|
939
|
+
#### Parameters
|
|
940
|
+
|
|
941
|
+
| Parameter | Type | Location | Required | Description |
|
|
942
|
+
| --- | --- | --- | --- | --- |
|
|
943
|
+
| `per_page` | integer | query | No | Number of items per page (default: 10) |
|
|
944
|
+
| `page` | integer | query | No | Page number for pagination (default: 1) |
|
|
945
|
+
| `search` | string | query | No | Search text to filter orders |
|
|
946
|
+
|
|
947
|
+
#### Response
|
|
948
|
+
|
|
949
|
+
**Success (200):**
|
|
950
|
+
|
|
951
|
+
```
|
|
952
|
+
{
|
|
953
|
+
"orders": {
|
|
954
|
+
"total": 25,
|
|
955
|
+
"per_page": 10,
|
|
956
|
+
"current_page": 1,
|
|
957
|
+
"last_page": 3,
|
|
958
|
+
"data": [
|
|
959
|
+
{
|
|
960
|
+
"created_at": "2025-06-15 10:30:00",
|
|
961
|
+
"invoice_no": "INV-000101",
|
|
962
|
+
"total_amount": 4999,
|
|
963
|
+
"uuid": "abc-123-def",
|
|
964
|
+
"type": "one-time",
|
|
965
|
+
"status": "completed",
|
|
966
|
+
"renewals_count": 0,
|
|
967
|
+
"order_items": [
|
|
968
|
+
{
|
|
969
|
+
"id": 1,
|
|
970
|
+
"post_title": "Premium Plugin",
|
|
971
|
+
"title": "Premium Plugin - Single Site",
|
|
972
|
+
"quantity": 1,
|
|
973
|
+
"payment_type": "one-time",
|
|
974
|
+
"line_meta": {
|
|
975
|
+
"bundle_parent_item_id": null
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
]
|
|
979
|
+
}
|
|
980
|
+
]
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
> The `created_at` timestamp is converted to the user's timezone (stored in `order.config.user_tz`, falling back to the site timezone).
|
|
986
|
+
|
|
987
|
+
#### Example
|
|
988
|
+
|
|
989
|
+
```
|
|
990
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders?per_page=10&page=1&search=plugin" \
|
|
991
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
---
|
|
995
|
+
|
|
996
|
+
### Get Order Details
|
|
997
|
+
|
|
998
|
+
GET `/fluent-cart/v2/customer-profile/orders/{order_uuid}`
|
|
999
|
+
|
|
1000
|
+
Retrieve full details for a specific order including line items, transactions, subscriptions, downloads, and addresses. The order must belong to the authenticated customer.
|
|
1001
|
+
|
|
1002
|
+
#### Parameters
|
|
1003
|
+
|
|
1004
|
+
| Parameter | Type | Location | Required | Description |
|
|
1005
|
+
| --- | --- | --- | --- | --- |
|
|
1006
|
+
| `order_uuid` | string | path | Yes | The UUID of the order (alphanumeric with dashes) |
|
|
1007
|
+
|
|
1008
|
+
#### Response
|
|
1009
|
+
|
|
1010
|
+
**Success (200):**
|
|
1011
|
+
|
|
1012
|
+
```
|
|
1013
|
+
{
|
|
1014
|
+
"order": {
|
|
1015
|
+
"id": 101,
|
|
1016
|
+
"fulfillment_type": "digital",
|
|
1017
|
+
"type": "one-time",
|
|
1018
|
+
"created_at": "2025-06-15 10:30:00",
|
|
1019
|
+
"invoice_no": "INV-000101",
|
|
1020
|
+
"currency": "USD",
|
|
1021
|
+
"uuid": "abc-123-def",
|
|
1022
|
+
"status": "completed",
|
|
1023
|
+
"payment_status": "paid",
|
|
1024
|
+
"shipping_status": "",
|
|
1025
|
+
"billing_address_text": "John Doe, 123 Main St, New York, NY 10001, US",
|
|
1026
|
+
"shipping_address_text": "",
|
|
1027
|
+
"subtotal": 4999,
|
|
1028
|
+
"total_amount": 4999,
|
|
1029
|
+
"total_paid": 4999,
|
|
1030
|
+
"total_refund": 0,
|
|
1031
|
+
"shipping_total": 0,
|
|
1032
|
+
"coupon_discount_total": 0,
|
|
1033
|
+
"manual_discount_total": 0,
|
|
1034
|
+
"tax_total": 0,
|
|
1035
|
+
"tax_behavior": "exclusive",
|
|
1036
|
+
"shipping_tax": 0,
|
|
1037
|
+
"payment_method": "stripe",
|
|
1038
|
+
"order_items": [
|
|
1039
|
+
{
|
|
1040
|
+
"id": 1,
|
|
1041
|
+
"variation_id": 10,
|
|
1042
|
+
"product_id": 5,
|
|
1043
|
+
"post_title": "Premium Plugin",
|
|
1044
|
+
"title": "Premium Plugin - Single Site",
|
|
1045
|
+
"quantity": 1,
|
|
1046
|
+
"unit_price": 4999,
|
|
1047
|
+
"subtotal": 4999,
|
|
1048
|
+
"payment_type": "one-time",
|
|
1049
|
+
"meta_lines": [],
|
|
1050
|
+
"extra_amount": 0,
|
|
1051
|
+
"image": "https://example.com/wp-content/uploads/product.jpg",
|
|
1052
|
+
"variant_image": "",
|
|
1053
|
+
"url": "https://example.com/product/premium-plugin/",
|
|
1054
|
+
"line_meta": {},
|
|
1055
|
+
}
|
|
1056
|
+
],
|
|
1057
|
+
"subscriptions": [],
|
|
1058
|
+
"downloads": [
|
|
1059
|
+
{
|
|
1060
|
+
"file_size": "2.5 MB",
|
|
1061
|
+
"title": "premium-plugin-v2.zip",
|
|
1062
|
+
"download_url": "https://example.com/?fct_download=..."
|
|
1063
|
+
}
|
|
1064
|
+
],
|
|
1065
|
+
"transactions": [
|
|
1066
|
+
{
|
|
1067
|
+
"id": 50,
|
|
1068
|
+
"uuid": "txn-abc-123",
|
|
1069
|
+
"order_id": 101,
|
|
1070
|
+
"amount": 4999,
|
|
1071
|
+
"status": "succeeded",
|
|
1072
|
+
"payment_method": "stripe",
|
|
1073
|
+
"created_at": "2025-06-15 10:30:00"
|
|
1074
|
+
}
|
|
1075
|
+
]
|
|
1076
|
+
},
|
|
1077
|
+
"section_parts": {
|
|
1078
|
+
"before_summary": "",
|
|
1079
|
+
"after_summary": "",
|
|
1080
|
+
"after_licenses": "",
|
|
1081
|
+
"after_subscriptions": "",
|
|
1082
|
+
"after_downloads": "",
|
|
1083
|
+
"after_transactions": "",
|
|
1084
|
+
"end_of_order": ""
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
> The `section_parts` object contains HTML strings injected by extensions via the `fluent_cart/customer/order_details_section_parts` filter.
|
|
1090
|
+
|
|
1091
|
+
**Error (renewal order redirect):**
|
|
1092
|
+
|
|
1093
|
+
```
|
|
1094
|
+
{
|
|
1095
|
+
"message": "This is a renewal order. Please check the parent order details.",
|
|
1096
|
+
"parent_order": {
|
|
1097
|
+
"uuid": "parent-abc-123"
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
**Error (order not found):**
|
|
1103
|
+
|
|
1104
|
+
```
|
|
1105
|
+
{
|
|
1106
|
+
"message": "Order not found"
|
|
1107
|
+
}
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1110
|
+
**Error (not logged in):**
|
|
1111
|
+
|
|
1112
|
+
```
|
|
1113
|
+
{
|
|
1114
|
+
"message": "You are not logged in"
|
|
1115
|
+
}
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
#### Example
|
|
1119
|
+
|
|
1120
|
+
```
|
|
1121
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/abc-123-def" \
|
|
1122
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
1123
|
+
```
|
|
1124
|
+
|
|
1125
|
+
---
|
|
1126
|
+
|
|
1127
|
+
### Get Upgrade Paths
|
|
1128
|
+
|
|
1129
|
+
GET `/fluent-cart/v2/customer-profile/orders/{order_uuid}/upgrade-paths`
|
|
1130
|
+
|
|
1131
|
+
Retrieve available upgrade/downgrade paths for a specific product variation within an order. Used to show plan switching options in the customer portal.
|
|
1132
|
+
|
|
1133
|
+
#### Parameters
|
|
1134
|
+
|
|
1135
|
+
| Parameter | Type | Location | Required | Description |
|
|
1136
|
+
| --- | --- | --- | --- | --- |
|
|
1137
|
+
| `order_uuid` | string | path | Yes | The UUID of the order (alphanumeric with dashes) |
|
|
1138
|
+
| `variation_id` | integer | query | Yes | The product variation ID to find upgrade paths for |
|
|
1139
|
+
|
|
1140
|
+
#### Response
|
|
1141
|
+
|
|
1142
|
+
**Success (200):**
|
|
1143
|
+
|
|
1144
|
+
```
|
|
1145
|
+
{
|
|
1146
|
+
"upgradePaths": [
|
|
1147
|
+
{
|
|
1148
|
+
"variation_id": 15,
|
|
1149
|
+
"title": "Premium Plugin - 5 Sites",
|
|
1150
|
+
"price": 9999,
|
|
1151
|
+
"billing_interval": "year",
|
|
1152
|
+
"upgrade_type": "upgrade",
|
|
1153
|
+
"prorated_amount": 5000
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"variation_id": 20,
|
|
1157
|
+
"title": "Premium Plugin - Unlimited Sites",
|
|
1158
|
+
"price": 19999,
|
|
1159
|
+
"billing_interval": "year",
|
|
1160
|
+
"upgrade_type": "upgrade",
|
|
1161
|
+
"prorated_amount": 15000
|
|
1162
|
+
}
|
|
1163
|
+
]
|
|
1164
|
+
}
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
**Error (not logged in):**
|
|
1168
|
+
|
|
1169
|
+
```
|
|
1170
|
+
{
|
|
1171
|
+
"message": "You must be logged in to view upgrade paths."
|
|
1172
|
+
}
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
**Error (order not found):**
|
|
1176
|
+
|
|
1177
|
+
```
|
|
1178
|
+
{
|
|
1179
|
+
"message": "Order not found or you do not have permission to view it."
|
|
1180
|
+
}
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
#### Example
|
|
1184
|
+
|
|
1185
|
+
```
|
|
1186
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/abc-123-def/upgrade-paths?variation_id=10" \
|
|
1187
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
1188
|
+
```
|
|
1189
|
+
|
|
1190
|
+
---
|
|
1191
|
+
|
|
1192
|
+
### Get Transaction Billing Address
|
|
1193
|
+
|
|
1194
|
+
GET `/fluent-cart/v2/customer-profile/orders/{transaction_uuid}/billing-address`
|
|
1195
|
+
|
|
1196
|
+
Retrieve the billing address associated with a specific transaction. Used for invoice/receipt editing in the customer portal.
|
|
1197
|
+
|
|
1198
|
+
#### Parameters
|
|
1199
|
+
|
|
1200
|
+
| Parameter | Type | Location | Required | Description |
|
|
1201
|
+
| --- | --- | --- | --- | --- |
|
|
1202
|
+
| `transaction_uuid` | string | path | Yes | The UUID of the transaction (alphanumeric with dashes) |
|
|
1203
|
+
|
|
1204
|
+
#### Response
|
|
1205
|
+
|
|
1206
|
+
**Success (200):**
|
|
1207
|
+
|
|
1208
|
+
```
|
|
1209
|
+
{
|
|
1210
|
+
"message": "Success",
|
|
1211
|
+
"data": {
|
|
1212
|
+
"address_1": "123 Main St",
|
|
1213
|
+
"address_2": "",
|
|
1214
|
+
"city": "New York",
|
|
1215
|
+
"state": "NY",
|
|
1216
|
+
"postcode": "10001",
|
|
1217
|
+
"country": "US",
|
|
1218
|
+
"name": "John Doe",
|
|
1219
|
+
"vat_tax_id": "EU123456789",
|
|
1220
|
+
"address_id": 15
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
**Success (200) - No billing address found:**
|
|
1226
|
+
|
|
1227
|
+
```
|
|
1228
|
+
{
|
|
1229
|
+
"message": "",
|
|
1230
|
+
"data": {
|
|
1231
|
+
"address_1": "",
|
|
1232
|
+
"address_2": "",
|
|
1233
|
+
"city": "",
|
|
1234
|
+
"state": "",
|
|
1235
|
+
"postcode": "",
|
|
1236
|
+
"country": "",
|
|
1237
|
+
"name": "",
|
|
1238
|
+
"vat_tax_id": "",
|
|
1239
|
+
"address_id": ""
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
**Error (customer not found):**
|
|
1245
|
+
|
|
1246
|
+
```
|
|
1247
|
+
{
|
|
1248
|
+
"message": "Customer not found"
|
|
1249
|
+
}
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
**Error (transaction not found):**
|
|
1253
|
+
|
|
1254
|
+
```
|
|
1255
|
+
{
|
|
1256
|
+
"message": "Transaction not found"
|
|
1257
|
+
}
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
**Error (order not found):**
|
|
1261
|
+
|
|
1262
|
+
```
|
|
1263
|
+
{
|
|
1264
|
+
"message": "Order not found"
|
|
1265
|
+
}
|
|
1266
|
+
```
|
|
1267
|
+
|
|
1268
|
+
#### Example
|
|
1269
|
+
|
|
1270
|
+
```
|
|
1271
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/txn-abc-123/billing-address" \
|
|
1272
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
1273
|
+
```
|
|
1274
|
+
|
|
1275
|
+
---
|
|
1276
|
+
|
|
1277
|
+
### Save Transaction Billing Address
|
|
1278
|
+
|
|
1279
|
+
PUT `/fluent-cart/v2/customer-profile/orders/{transaction_uuid}/billing-address`
|
|
1280
|
+
|
|
1281
|
+
Create or update the billing address for a specific transaction's order. Also stores the VAT/Tax ID as order metadata. Validates address fields against country-specific rules.
|
|
1282
|
+
|
|
1283
|
+
#### Parameters
|
|
1284
|
+
|
|
1285
|
+
| Parameter | Type | Location | Required | Description |
|
|
1286
|
+
| --- | --- | --- | --- | --- |
|
|
1287
|
+
| `transaction_uuid` | string | path | Yes | The UUID of the transaction (alphanumeric with dashes) |
|
|
1288
|
+
| `address_id` | string | body | No | Existing order address ID to update. If empty, a new address is created. |
|
|
1289
|
+
| `name` | string | body | Yes | Contact name |
|
|
1290
|
+
| `address_1` | string | body | Conditional | Primary street address. Required based on country validation rules. |
|
|
1291
|
+
| `address_2` | string | body | No | Secondary address line |
|
|
1292
|
+
| `city` | string | body | Conditional | City. Required based on country validation rules. |
|
|
1293
|
+
| `state` | string | body | Conditional | State/province code. Required for countries with states. |
|
|
1294
|
+
| `postcode` | string | body | Conditional | Postal/zip code. Validated against country-specific format. |
|
|
1295
|
+
| `country` | string | body | Yes | Country code (e.g., `US`, `GB`) |
|
|
1296
|
+
| `vat_tax_id` | string | body | No | VAT or Tax ID. Stored as order meta. |
|
|
1297
|
+
|
|
1298
|
+
#### Response
|
|
1299
|
+
|
|
1300
|
+
**Success (200) - Address created:**
|
|
1301
|
+
|
|
1302
|
+
```
|
|
1303
|
+
{
|
|
1304
|
+
"message": "Billing address created successfully",
|
|
1305
|
+
"address_id": 25
|
|
1306
|
+
}
|
|
1307
|
+
```
|
|
1308
|
+
|
|
1309
|
+
**Success (200) - Address updated:**
|
|
1310
|
+
|
|
1311
|
+
```
|
|
1312
|
+
{
|
|
1313
|
+
"message": "Billing address updated successfully",
|
|
1314
|
+
"formatted_address": "John Doe, 123 Main St, New York, NY 10001, US"
|
|
1315
|
+
}
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1318
|
+
**Error (order not found):**
|
|
1319
|
+
|
|
1320
|
+
```
|
|
1321
|
+
{
|
|
1322
|
+
"message": "Order not found"
|
|
1323
|
+
}
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
**Error (validation):**
|
|
1327
|
+
|
|
1328
|
+
```
|
|
1329
|
+
{
|
|
1330
|
+
"errors": {
|
|
1331
|
+
"country": ["The country field is required."]
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
#### Example
|
|
1337
|
+
|
|
1338
|
+
```
|
|
1339
|
+
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/customer-profile/orders/txn-abc-123/billing-address" \
|
|
1340
|
+
-H "Content-Type: application/json" \
|
|
1341
|
+
-d '{
|
|
1342
|
+
"address_id": "15",
|
|
1343
|
+
"name": "John Doe",
|
|
1344
|
+
"address_1": "123 Main St",
|
|
1345
|
+
"city": "New York",
|
|
1346
|
+
"state": "NY",
|
|
1347
|
+
"postcode": "10001",
|
|
1348
|
+
"country": "US",
|
|
1349
|
+
"vat_tax_id": "EU123456789"
|
|
1350
|
+
}' \
|
|
1351
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
1352
|
+
```
|
|
1353
|
+
|
|
1354
|
+
---
|
|
1355
|
+
|
|
1356
|
+
## Downloads
|
|
1357
|
+
|
|
1358
|
+
Endpoints for accessing downloadable products from the customer portal.
|
|
1359
|
+
|
|
1360
|
+
### List Downloads
|
|
1361
|
+
|
|
1362
|
+
GET `/fluent-cart/v2/customer-profile/downloads`
|
|
1363
|
+
|
|
1364
|
+
Retrieve a paginated list of downloadable files available to the authenticated customer. Only includes downloads from orders with a successful payment status. Filters downloads based on purchased product variations.
|
|
1365
|
+
|
|
1366
|
+
#### Parameters
|
|
1367
|
+
|
|
1368
|
+
| Parameter | Type | Location | Required | Description |
|
|
1369
|
+
| --- | --- | --- | --- | --- |
|
|
1370
|
+
| `page` | integer | query | No | Page number for pagination (default: 1) |
|
|
1371
|
+
| `per_page` | integer | query | No | Number of items per page (default: 10) |
|
|
1372
|
+
|
|
1373
|
+
#### Response
|
|
1374
|
+
|
|
1375
|
+
**Success (200):**
|
|
1376
|
+
|
|
1377
|
+
```
|
|
1378
|
+
{
|
|
1379
|
+
"message": "Success",
|
|
1380
|
+
"downloads": {
|
|
1381
|
+
"data": [
|
|
1382
|
+
{
|
|
1383
|
+
"file_size": "2.5 MB",
|
|
1384
|
+
"title": "premium-plugin-v2.0.1.zip",
|
|
1385
|
+
"download_url": "https://example.com/?fct_download=eyJ0eXAi..."
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
"file_size": "1.2 MB",
|
|
1389
|
+
"title": "starter-theme-v1.5.zip",
|
|
1390
|
+
"download_url": "https://example.com/?fct_download=eyJ0eXAi..."
|
|
1391
|
+
}
|
|
1392
|
+
],
|
|
1393
|
+
"total": 5,
|
|
1394
|
+
"per_page": 10,
|
|
1395
|
+
"current_page": 1,
|
|
1396
|
+
"last_page": 1
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
**Success (200) - Not logged in (empty result):**
|
|
1402
|
+
|
|
1403
|
+
```
|
|
1404
|
+
{
|
|
1405
|
+
"message": "Success",
|
|
1406
|
+
"downloads": {
|
|
1407
|
+
"data": [],
|
|
1408
|
+
"total": 0,
|
|
1409
|
+
"per_page": 10,
|
|
1410
|
+
"current_page": 1,
|
|
1411
|
+
"last_page": 1
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1416
|
+
> The `download_url` contains a signed/encoded token that authorizes the download. These URLs are generated by `Helper::generateDownloadFileLink()` and are time-limited.
|
|
1417
|
+
|
|
1418
|
+
#### Example
|
|
1419
|
+
|
|
1420
|
+
```
|
|
1421
|
+
curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/downloads?per_page=20&page=1" \
|
|
1422
|
+
--cookie "wordpress_logged_in_xxx=..."
|
|
1423
|
+
```
|