Skip to content

Business Invites

Introduction

The Business Invites API allows you to create use business invites.

Usage

List

Pagination Enabled

Create

Create a business invite

Parameters

PropertyTypeRequiredExample
emailString"ironman@avengers.com"
business_idXUID"d1dfb302-b53d-11ea-95d2-0100f1a50c6e"

Usage

const businesses = await Xedi.BusinessInvites.create(
{
email: "ironman@avengers.com",
business_id: "d1dfb302-b53d-11ea-95d2-0100f1a50c6e"
}
);

Response

{
"data": [
{
"business_id": "024d9f46-183e-11eb-9e83-0100f1a50c6e",
"created_at": "2020-10-27 11:00:43",
"email": "ironman@avengers.com",
"invited_by": "c8f2c32a-183d-11eb-95d7-01002da17977",
"updated_at": "2020-10-27 11:00:43",
"_id": "a8604cc6-1843-11eb-9d3b-0242ac120012",
}
]
}

Mine

Get all business invites for the currently authed user

Usage

const businesses = await Xedi.BusinessInvites.mine();

Response

{
"data": [
{
"business_id": "024d9f46-183e-11eb-9e83-0100f1a50c6e",
"created_at": "2020-10-27 11:00:43",
"email": "ironman@avengers.com",
"invited_by": "c8f2c32a-183d-11eb-95d7-01002da17977",
"updated_at": "2020-10-27 11:00:43",
"_id": "a8604cc6-1843-11eb-9d3b-0242ac120012",
}
]
}

Accept

Accept a business Invite

Parameters

PropertyTypeRequiredExample
idXUID

Usage

const businesses = await Xedi.BusinessInvites.accept("d1dfb302-b53d-11ea-95d2-0100f1a50c6e");

Response

{
"data": [
"success"
]
}

Decline

Decline a business Invite

Parameters

PropertyTypeRequiredExample
idXUID

Usage

const businesses = await Xedi.BusinessInvites.decline("d1dfb302-b53d-11ea-95d2-0100f1a50c6e");

Response

{
"data": [
"success"
]
}

Withdraw

Withdraw a business Invite

Parameters

PropertyTypeRequiredExample
idXUID

Usage

const businesses = await Xedi.BusinessInvites.withdraw("d1dfb302-b53d-11ea-95d2-0100f1a50c6e");

Response

{
"data": [
"success"
]
}

Pending

Get all pending business invites for a business

Usage

const businesses = await Xedi.BusinessInvites.pending("024d9f46-183e-11eb-9e83-0100f1a50c6e");

Response

{
"data": [
{
"business_id": "024d9f46-183e-11eb-9e83-0100f1a50c6e",
"created_at": "2020-10-27 11:00:43",
"email": "ironman@avengers.com",
"invited_by": "c8f2c32a-183d-11eb-95d7-01002da17977",
"updated_at": "2020-10-27 11:00:43",
"_id": "a8604cc6-1843-11eb-9d3b-0242ac120012",
},
{
"business_id": "024d9f46-183e-11eb-9e83-0100f1a50c6e",
"created_at": "2020-10-27 11:00:43",
"email": "ironman@avengers.com",
"invited_by": "c8f2c32a-183d-11eb-95d7-01002da17977",
"updated_at": "2020-10-27 11:00:43",
"_id": "a8604cc6-1843-11eb-9d3b-0242ac120012",
}
]
}