Public Form Builder
6 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
Fetch a published form by its public slug#
GET
/public/forms/{slug}ÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}"Open a Stripe Checkout session for a published form#
POST
/public/forms/{slug}/checkout-sessionÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
originPflicht | Header | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
field_keyPflicht | string | field_key of the `products` field being paid for. |
selectionsPflicht | FormPaymentSelectionDto[] | Selected products and their quantities. |
selections[].product_idPflicht | string | Catalog product id, taken from the products field options. |
selections[].quantityPflicht | number | Requested quantity. Clamped server-side to the product min/max. |
submission_dataPflicht | object | Full answer map keyed by field_key. Validated and saved as a draft submission before charging. |
Antworten
- 200OK
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}/checkout-session" \
-H "Content-Type: application/json" \
-d '{"field_key":"…","selections":[],"submission_data":{}}'Non-secret payment config for a published form#
GET
/public/forms/{slug}/payment-configÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}/payment-config"Poll payment state for a checkout session#
GET
/public/forms/{slug}/payment-statusÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
session_idPflicht | Query | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}/payment-status"Submit a published form#
POST
/public/forms/{slug}/submitÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
Request-Body
Keine Felder dokumentiert.
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}/submit" \
-H "Content-Type: application/json" \
-d '{}'Upload a file for a file_upload/audio field on a published form#
POST
/public/forms/{slug}/uploadÖffentlichParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
slugPflicht | Pfad | string | – |
fieldKeyPflicht | Query | string | The field_key of the file_upload/audio field |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/public/forms/{slug}/upload"