Create Share

Create a share record for data exchange between qid accounts

POST /di/share

Body

PropertyTypeDescription
templateIdstringTemplate ID for the share
otherFieldsFields[]Additional form fields
participantsParticipant[]Accounts involved in the share
statusstringShare status (open, completed, closed)

Example request

curl --request POST 'https://api.qidpro.xyz/di/share' \
  --header 'Authorization: Bearer your-secret-key' \
  --header 'tokenId: your-token-id' \
  --header 'Content-Type: application/json' \
  --data '{
    "templateId": "669d25bf4be6e965914a9e3e",
    "otherFields": [
      {
        "label": "Purpose of Visit",
        "name": "purpose_of_visit",
        "value": "Work"
      }
    ],
    "status": "open",
    "participants": [
      {
        "roles": ["organiser", "admin"],
        "account_id": "6627c83c122f76583c42ff10",
        "accountType": "organisation",
        "accountSnapshot": {
          "name": "Hotel Raj - Manali",
          "displayPictureUrl": "c103be92343.jpeg"
        },
        "analytics": {
          "gender": "male",
          "age": 23,
          "zipCode": "110030"
        }
      },
      {
        "roles": ["sharer", "admin"],
        "account_id": "65dea5868910b6f5957a0fb5",
        "accountType": "user",
        "accountSnapshot": {
          "name": "Manu Arya"
        },
        "sharedDocumentsIds": [
          "65df7d42fdfc8d3689057d8e"
        ]
      }
    ]
  }'

Participant fields

FieldDescription
rolesArray of roles: organiser, admin, sharer
account_idqid account ID
accountTypeuser or organisation
accountSnapshotSnapshot of account details at share creation
sharedDocumentsIdsDocument IDs shared by this participant
analyticsOptional analytics metadata

Did this page help you?