Skip to main content

πŸ§‘β€πŸ€β€πŸ§‘ Your B2B customer's users directory

The Organizations allows you to manage your business-to-business (B2B) customers, and segments strictly that end-users access their applications. Each end-user are stored in a distinct directory for a dedicated customer (Organization), and the end-user experience is customized in your colors with a white label User interface.

  • An (Organization) represents a business customer or partner in your Cryptr service.
note

Your Cryptr subscription plan you choose limit this feature. A free account is limited to 1 organization to manage.

The Organization type​

Each new organization get a domain generated from its name. A domain is impossible to update, because it's the identifier of the organization.

ATTRIBUTES​

id UUID​

Immutable identifier in the Universal Unique Identifier (UUID) format.


name STRING​

The name of your organization will be β€œsluggifiedβ€œ & store at the domain field. β€œAwesome company" will become "awesome-company".


state STRING​

The state of the locality (of the Organization).


country_name ENUM​

The ISO3166-1 Alpha2 of the Organization.


inserted_at STRING​

Date time of the insertion


privacy_policy_url URL​

Url of the privacy policy url of your service.

terms_of_service_url URL​

Url of the terms of service url of your service.


updated_at STRING​

Last update date time


locality STRING​

The Head Quarter locality of the organization


domain SLUG​

Immutable identifier of the organization in a "slug format": domain is a STRING value in "lowercase" with "underline", generated from the name.

EXAMPLE​
An Organization type

{
"__type__": "Organization",
"name": "Misapret",
"state": "Nord",
"country_name": "FR",
"inserted_at": "2021-10-18T10:02:31",
"privacy_policy_url": null,
"terms_of_service_url": null,
"updated_at": "2021-10-18T10:02:31",
"id": "bbc39a5a-905c-4def-90e6-605ed7b27098",
"locality": "Lille",
"domain": "misapret",
}

Create an Organization​

Creates a new Organization type with a name & a locality (the city of the organization).

Query

# With Address engine
curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/organizations/${ORGANIZATION_DOMAIN} \
-d autocomplete_address="San Francisco"
-d privacy_policy_url="https://misapret.com/policy"

# OR Without Address engine
curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/organizations/${ORGANIZATION_DOMAIN} \
-d locality="Lille"
-d state="Hauts-de-France"
-d country_name="FR"
-d privacy_policy_url="https://misapret.com/policy"

PARAMETERS​

name STRING REQUIRED​

The name of your organization will be β€œsluggifiedβ€œ & store into the domain field. β€œAwesome company" will become "awesome-company".


autocomplete_address STRING​

Use this field to autocomplete address fields (state, locality , country_name) using our address engine.

examples:

  • "autocomplete_address": "Dublin" will return "country_name": "IE", "locality": "Dublin", "state": "Leinster"
  • "autocomplete_address": "Dublin, CA" will return "country_name": "US", "locality": "Dublin", "state": "Californie"
locality STRING​

⚠️ required if you do no use autocomplete_address

The city of the organization

state STRING​

⚠️ required if you do no use autocomplete_address

The state (region/state district) of the organization

country_name STRING​

⚠️ required if you do no use autocomplete_address

The ISO 3166-2 code of the organization.

RETURNS​

Returns an Organization if the creation succeeded. Returns an error if create parameters are invalid (e.g. specifying an invalid code or an invalid source).

Retrieve an Organization​

Fetch an Organization by its given domain. The domain is generated from its name. It's a unique and immutable value in your Cryptr service.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/organizations/${ORGANIZATION_DOMAIN}


PARAMETERS​
organization_domain* STRING​

Domain is a STRING value in "lowercase" with "underline", generated from the name.

Returns​

Returns the Organization for a valid identifier. If it’s for a deleted Organization, a subset of the Organization’s information is returned, including a deleted property that’s set to true.

Update an Organization​

You can't update the domain of an Organization. If you need to, you have to create a new one.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/organizations/${ORGANIZATION_DOMAIN} \
-d locality="San Francisco"
-d privacy_policy_url="https://misapret.com/policy"

PARAMETERS​

name STRING​

The name of your organization (won't change domain because already set at creation)


autocomplete_address STRING​

Use this field to autocomplete address fields (state, locality , country_name) using our address engine.

examples:

  • "autocomplete_address": "Dublin" will return "country_name": "IE", "locality": "Dublin", "state": "Leinster"
  • "autocomplete_address": "Dublin, CA" will return "country_name": "US", "locality": "Dublin", "state": "Californie"

locality STRING​

⚠️ required if you do no use autocomplete_address

The city of the organization


state STRING​

⚠️ required if you do no use autocomplete_address

The state (region/state district) of the organization


country_name STRING​

⚠️ required if you do no use autocomplete_address

The ISO 3166-2 code of the organization.


privacy_policy_url URL​

Url of the privacy policy url of your service.

terms_of_service_url URL​

Url of the terms of service url of your service.


locality STRING​

You can describe, with an indication of the language as standard ISO 3166-2.

RETURNS​

Returns the Organization if the update succeeded. Returns an error if create parameters are invalid (e.g. specifying an invalid code or an invalid source).

List all Organizations​

Returns a list of your Organizations. The Organizations are returned sorted by creation date, with the most recent customers appearing first.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/organizations

PARAMETERS​

page INTEGER​

Precise the page of your listing, see how to paginate the Cryptr API.


per_page INTEGER​

Precise the size of the pages of the pagination of the list, see how to paginate the Cryptr API.


filter STRING​

Filter the list, see of all possible of search_types to filter on the attributes of the Organizations with the the Cryptr API pagination.


sort STRING​

Sort the list, see how to sort on the attributes of the Organizations.

RETURNS​

A dictionary with a data property that contains an array of up to limit Organizations. Each entry in the array is a separate Organization type. If no Organizations are available, the resulting array will be empty. This request should never return an error.