Invite a contractor and add them to a Collaborator group

This API endpoint is used to invite a contractor to join your project as a collaborator. By using this endpoint, you can simultaneously invite contractors via their email address and assign them to a specific collaborator group using a collaborator group ID.

Endpoint

POST https://api.wingspan.app/payments/collaborator

Headers

  • accept: Defines the type of content the client expects. Always set to application/json.
  • content-type: Defines the media type of the request. Always set to application/json.
  • authorization: The authentication token for the API. Prefix with Bearer.

Request

The request payload must be a JSON object with the following properties:

  • clientId (string, Required): The unique identifier for the client.
  • memberCompany (string, Optional): The name of the company the member belongs to.
  • memberEmail (string, Required): The email address of the contractor to be invited.
  • memberName (string, Optional): The name of the contractor to be invited.
  • collaboratorGroupId (string, Optional): The unique identifier for the collaborator group to which the member will be assigned.

Example Request

{
  "memberCompany": "Construction Central",
  "clientId": "123asd",
  "memberEmail": "[email protected]",
  "memberName": "Jon Smith",
  "collaboratorGroupId": "123asd"
}

Response

Upon a successful operation, the API will return a status code of 200

  • collaboratorId (string, Required): The unique identifier for the collaborator.
  • createdAt (string, Required): Timestamp indicating when the collaborator was created.
  • memberId (string, Required): The unique identifier for the member.
  • status (string, Required): Indicates the status of the collaborator. It could be Active, Inactive, or Pending.
  • updatedAt (string, Required): Timestamp indicating the last time the collaborator information was updated.
  • userRoles (object, Required): Contains ownerIds (array of strings, Required) and viewerIds (array of strings, Required).
  • collaboratorGroupIds (array of strings, Optional): The groups to which the collaborator belongs.
  • eligibilityRequirements (array, Optional): An array of objects representing the eligibility requirements for the collaborator.

Example Response

{
  "collaboratorId": "collab789def",
  "createdAt": "2023-12-01T14:45:28Z",
  "memberId": "mem456ghi",
  "status": "Pending",
  "updatedAt": "2023-12-01T14:45:28Z",
  "userRoles": {
    "ownerIds": ["owner123jkl", "owner234mno"],
    "viewerIds": ["viewer345pqr", "viewer456stu"]
  },
  "collaboratorGroupIds": ["grp123vwx", "grp234yza"],
  "eligibilityRequirements": [
    {
      "clientId": "cli123abc",
      "collaboratorGroupId": "grp123vwx",
      "eligibilityRequirementId": "req123bcd",
      "requirementType": "Signature",
      "document": {
        "documentId": "doc123cde",
        "status": "New",
        "templateId": "tmpl123def",
        "validFor": 180
      }
    },
    {
      "clientId": "cli456efg",
      "collaboratorGroupId": "grp234yza",
      "eligibilityRequirementId": "req456fgh",
      "requirementType": "Document",
      "document": {
        "documentId": "doc456ghi",
        "status": "Sent",
        "templateId": "tmpl456hij",
        "validFor": 365
      }
    }
  ]
}