Announcement

Collapse
No announcement yet.

Upload image for a contact through API-Rest call

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload image for a contact through API-Rest call

    Hi

    I have an external form for my leads. When submitting the form, it calls espo CRM APIs to create the contact.
    I'd like to upload through Espo CRM API an image (submitted from my form).

    I check that there is some endpoint like POST v1/Attachment/action/upload
    then PUT api/v1/Attachment/5593f310eb6d6636d

    Then PATCH request to set up my FieldID, FiledName

    Is there a way to make all these steps easy ?



  • #2
    Hi

    Yes. But you can also achieve the same w/o the first step.
    POST api/v1/Attachment
    with file base64 encoded contents
    See
    application/Espo/Services/Service.php

    And then PATCH

    Comment

    Working...
    X