Skip to content

Consents

Consent document storage and request endpoints. Used when product content shows other person(s).


POST /api/consents/store-or-send

Stores consent documents for a product, or sends a consent request via email to a third party.

Authentication: Required

Request Body (multipart/form-data)

FieldTypeRequiredDescription
product_idintegerYesProduct ID
datestringYesConsent date (YYYY-MM-DD)
filesfile[]NoConsent document files
emailstringNoIf no files: send consent request to this email

Behavior

  • If files provided: Consent documents are stored and linked to the product
  • If email provided (no files): Consent request is sent via email for the recipient to complete
  • If product has no media: Consent processing is queued and completed when media is available

Example Request

bash
curl -X POST https://fangate.info/api/consents/store-or-send \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "product_id=1213" \
  -F "date=2025-12-19" \
  -F "files=@consent.pdf"

Response (200)

json
{
  "success": true,
  "errors_message": null,
  "data": []
}

Response (202)

When product has no media and processing is queued:

json
{
  "success": true,
  "errors_message": null,
  "data": "Consent processing has been queued and will be completed when media files are available"
}

Response (500)

json
{
  "success": false,
  "errors_message": "Online or PDF form URL is not configured",
  "data": null
}

Current Limitation

Consent can be uploaded for one person per product only. Multiple persons are not yet supported.

Fangate API Documentation