GetbeelDocs

Invite a commercialista to several companies

Invites one commercialista (read-only auditor role) to this account and/or several of its client companies at once (company_ids, at most 25; without them, the company of the Getbeel-Company header, else this account). Each company is invited exactly like POST /advisors, with its own permissions and invitation policies. Always 200 with one result per company: invited, already_invited (the pending invitation, no second email), or failed with the reason (company_not_found for an id that is not this account or a client company you manage, already_member, invite_not_allowed, subscription_required, credits_exhausted, rate_limited, invite_failed). One company failing never stops the others. A test key gets 403 livemode_required before anything is sent. Live keys only (403 livemode_required). The key’s member needs the invites.manage permission (to invite or revoke) or members.manage (to remove a member), the same rules as the app; otherwise 403.

POST
/advisors/invitations

Invites one commercialista (read-only auditor role) to this account and/or several of its client companies at once (company_ids, at most 25; without them, the company of the Getbeel-Company header, else this account). Each company is invited exactly like POST /advisors, with its own permissions and invitation policies. Always 200 with one result per company: invited, already_invited (the pending invitation, no second email), or failed with the reason (company_not_found for an id that is not this account or a client company you manage, already_member, invite_not_allowed, subscription_required, credits_exhausted, rate_limited, invite_failed). One company failing never stops the others. A test key gets 403 livemode_required before anything is sent. Live keys only (403 livemode_required). The key’s member needs the invites.manage permission (to invite or revoke) or members.manage (to remove a member), the same rules as the app; otherwise 403.

Autorizzazione

apiKey
headerAuthorizationBearer <token>

API key: gb_test_… or gb_live_…

Idempotency-Key?string

Recommended. Retrying with the same key and body within 24 hours replays the first response (header Idempotent-Replayed: true) instead of acting twice. The same key with a different body returns 422 idempotency_key_reused.

Lengthlength <= 255
Getbeel-Company?string

Act on one of the account's client companies (its id from GET /companies) instead of the key's own account. 404 company_not_found when the key cannot act on it.

Formatuuid
application/json
  1. body
email*string

Email the invitation is sent to

Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
Lengthlength <= 320
company_ids?array<>

The companies to invite them to (at most 25). Default: the company of the Getbeel-Company header, else this account.

Items1 <= items <= 25

Corpo della risposta

OK

application/json
  1. response
object*string
email*string
invited*integer

New invitations sent

Range-9007199254740991 <= value <= 9007199254740991
already_invited*integer

Companies where this address already had a pending advisor invitation (returned, no second email)

Range-9007199254740991 <= value <= 9007199254740991
failed*integer
Range-9007199254740991 <= value <= 9007199254740991
data*array<>

One result per company, in the order sent

Esempio di richiesta
curl -X POST 'https://www.getbeel.com/api/v1/advisors/invitations' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Esempio di risposta
{  "object": "advisor_invitations",  "email": "string",  "invited": -9007199254740991,  "already_invited": -9007199254740991,  "failed": -9007199254740991,  "data": [    {      "company_id": "string",      "company_name": "string",      "status": "invited",      "advisor": {        "id": "inv_42",        "object": "advisor",        "email": "string",        "name": "string",        "role": "auditor",        "status": "invited",        "invited_at": "2019-08-24T14:15:22Z",        "expires_at": "2019-08-24T14:15:22Z",        "joined_at": "2019-08-24T14:15:22Z"      },      "error": {        "code": "string",        "message": "string"      }    }  ]}