Erstelle eine API Schnittstelle (en)


Derzeit gibt es diesen Artikel nur auf englisch.

Wir möchten ihn dir dennoch nicht vorenthalten.

Wir arbeiten unter Hochdruck daran all unsere Artikel in naher Zukunft in deutsch einzustellen.

Wenn du bis dahin Fragen dazu hast, wende dich gerne einfach direkt an uns. Entweder im Chat rechts unten oder per Mail an support@samdock.com.


In this tutorial, we'll show you how to create a request source with a custom API.

☝ API (Application Programming Interface) is an intermediary software that allows communication and exchange of information between two programs.

Create a new API source

From the Home Dashboard, go to Settings.

Click on Request sources.

Click on New source.

Select the type of form you want to create:

  • Simple form: create your form and embed it in your website
  • Custom API source: create a form that will be connected from your website to Samdock through API

For the purpose of this tutorial, we'll choose Custom API source.

Set up the URL for the request

Copy the URL below with the ID for your API interface. This URL will be use by your provider (normally, your form provider) to submit information to Samdock via API.

https://samdock.app/api/contacts/drafts/{source-ID}

Prepare the body of the request

When posting to a source, the body of the request should match the fields that are set up in the source settings.

Below, you'll find the field key names and the value types that are expected by the API.

firstName?: string; 
lastName?: string; 
email?: string; 
birthday?: string | Date; 
gender?: Gender;
namePrefix?: string;
nameSuffix?: string;
website?: string;
street?: string;
number?: string;
postcode?: string;
city?: string;
phoneNumber?: string;
mobileNumber?: string;
officeNumber?: string;
homeNumber?: string;
privateNumber?: string;
faxNumber?: string;
instagram?: string;
linkedin?: string;
facebook?: string;
twitter?: string;
xing?: string;

companyName?: string;
companyEmail?: string;
companyTaxID?: string;
companyStreet?: string;
companyNumber?: string;
companyPostcode?: string;
companyCity?: string;
companyPhoneNumber?: string;
companyFaxNumber?: string;
companyWebsite?: string;
companyInstagram?: string;
companyLinkedin?: string;
companyFacebook?: string;
companyTwitter?: string;
companyXing?: string;

leadRequirements?: string;

Implementation

This step depends on what you are trying to connect with Samdock.

Make sure to check the documentation of your providers to learn how to implement it.

Should any problems arise, contact our Support team so they can guide you.

Wurde deine Frage beantwortet? Vielen Dank für dein Feedback Es gab ein Problem, dein Feedback zu übermitteln. Bitte versuche es später noch einmal.