Quick Registration - for quick integration
Automatic translation. View original
If you do not have technical knowledge you can take advantage of this integration through Zapier: https://zapier.com/apps/padma-da67847/integrations
For integration with websites, forms, etc.
To create a contact and register an interaction. If the contact already exists, the interaction will be added to the found record. For contacts with status student at the school, the record is a comment; in other cases, it is a communication.
The communication is created with the current date. “NOW” respecting the school's time zone.
To identify an existing contact, PADMA first searches by email and, if not found, by phone, always within the same school. The search considers valid phones sent in mobile, telephone or business_phone. Name, RG, CPF and DNI are not used to locate the existing record. Without a match, a new contact may be created; so keep email and phone consistent across submissions.
ENDPOINT
POST https://crm.padm.am/api/v1/form_integration
For this integration, use an API key with access form_integration, linked to an enabled school. Keys full_access and automations also allow sending; single_read does not allow. The school key determines the destination account, without the need to send account_name.
Send the fields at the root of the JSON or the form, without wrapping them in form_integration, contact or comment.
Response
-
202—{"message":"QUEUED"}: submission accepted for background processing. Does not confirm that the contact and interaction have already been recorded, nor returns the contact ID. -
200—{"message":"DUPLICATE"}: the same content was received again within the two-minute window and was not queued again. -
400—{"message":"INVALID"}: the form did not pass initial validation. -
401— textaccess denied: unauthorized access. -
429—{"message":"RATE_LIMITED"}, withRetry-After: 60: school limit exceeded. Wait at least 60 seconds before trying again.
A 200 DUPLICATE does not prove that the previous submission was valid or processed.
Request limits
The endpoint allows 120 authorized requests per school in a 60-second window, starting at the first counted request. All keys of the same school share this limit. Repeated submissions and invalid forms also count.
When the limit is exceeded, the response is HTTP 429, with body {"message":"RATE_LIMITED"} and header Retry-After: 60. The rejected submission is not queued nor recorded in the duplicate filter. Wait at least 60 seconds before trying again and distribute imports in batches over time. Avoid multiple simultaneous attempts after a 429.
Arguments
Required
The API key can be sent in api_key or in the header X-API-KEY. If both are present, api_key takes precedence.
Preferably provide first_name. If the name is absent, the system uses friendly_name or the part before the @ of email. For submissions with only email, use a valid address. A phone alone is not sufficient.
Optional
Only one value per field should be sent.
- first_name, firstname, name
The contact's first name.
- friendly_name, alias, aka
Contact's display name. Also used as the name when first_name not provided.
- last_name, lastname
The contact's last name.
- email, e-mail
The contact's email
If invalid, it will be saved as custom data named 'invalid-email'
- telephone, telefone
The contact's phone
If invalid, it will be saved as custom data named invalid-telephone.
- mobile, mobile_phone, mobile_telephone, phone_mobile
Cell phone. Invalid values are saved as invalid-mobile.
- business_phone
Business phone. Invalid values are saved as invalid-business_phone.
- telephone_country, phone_country, country_code, country_name
Country used in phone interpretation. Prefer a code like BR. When omitted, the school's country is used.
- coefficient
Contact coefficient.
Accepted values: perfil, pmas, pmenos, fp, unknown
Default: 'unknown'
- tags, new_tags, new_tag_names
Tags to add to the contact
- title, subject
Default: ‘contact through the website’
- message
Content of the interaction notes. When provided, it is combined with the title in the format título: mensagem. Without a message, the notes contain only the title.
- padma_username
User to whom the interaction will be assigned. Default: system.
- birthday, aniversario, cumpleaños
Date of birth. Prefer YYYY-MM-DD. Also accepted are birthday_day, birthday_month and birthday_year. A date that cannot be interpreted is saved as invalid-birthday. A different existing date is preserved.
- marketing_method_names
Marketing methods separated by commas, associated with the communication. They do not apply when the interaction is recorded as a comment.
- rg, id_rg; cpf, id_cpf; dni, id_dni
Identification documents. Send each document in its corresponding field.
- identification, identification_label
Generic document and its type. The default type is dni.
- address, address_street, address_street_name
Address. Provide one of these fields so that the complements are interpreted as part of the address: address_street_number, address_door, address_postal_code, address_city, address_neighborhood, address_state, address_country and address_label (or address_category).
- occupation, profession
Contact's profession.
- Any other word
Any other parameter sent will be saved as a custom data in the contact.
Optional signatures and metadata
legal_signatures accepts a list of objects with title, signed_document_text, signature_data, signature_date, longitude, latitude and browser. The signatory's name and email are obtained from the contact's fields. This list is an exception to the guideline of sending a single value per field.
ip_address (or remote_ip, ip) and user_agent (or user-agent, ua) are used as metadata for these signatures.
Example of submission
curl --request POST 'https://crm.derose.app/api/v1/form_integration' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: SUA_CHAVE_DA_ESCOLA' \
--data '{"first_name":"Ana","last_name":"Silva","email":"ana@example.com","tags":"baila","title":"Compra confirmada","message":"Evento: aula aberta. Pedido: EXEMPLO-123."}'