Added identity providers —
Check the API reference
LogoLogo
Other APIsChangelog
  • Welcome to Provisioning API
  • Getting started
    • API specification
    • Authorization
    • Applications
  • API reference
    • API credentials
      • The API credential object
      • Create an API credential
      • List all API credentials
      • Retrieve an API credential
      • Update an API credential
      • Delete an API credential
    • Application memberships
      • The application membership object
      • Create an application membership
      • List all application memberships
      • Retrieve an application membership
      • Update an application membership
      • Delete an application membership
    • Identity providers
      • The identity provider object
      • Create an identity provider
      • List all identity providers
      • Retrieve an identity provider
      • Update an identity provider
      • Delete an identity provider
    • Memberships
      • The membership object
      • Create a membership
      • List all memberships
      • Retrieve a membership
      • Update a membership
      • Delete a membership
    • Membership profiles
      • The membership profile object
      • Create a membership profile
      • List all membership profiles
      • Retrieve a membership profile
      • Update a membership profile
      • Delete a membership profile
    • Organizations
      • The organization object
      • Create an organization
      • List all organizations
      • Retrieve an organization
      • Update an organization
    • Permissions
      • The permission object
      • Create a permission
      • List all permissions
      • Retrieve a permission
      • Update a permission
    • Roles
      • The role object
      • Create a role
      • List all roles
      • Retrieve a role
      • Update a role
    • User
      • The user object
      • Retrieve the user
      • Update the user
    • Versions
      • The version object
      • List all versions
      • Retrieve a version
On this page
  • Request
  • Example
  • Sortable fields
  • Filterable fields
  1. API reference
  2. Organizations

List all organizations

How to fetch a collection of organizations via API

PreviousCreate an organizationNextRetrieve an organization

Last updated 6 days ago

To fetch a collection of organizations, send a GET request to the /api/organizations endpoint.

Request

GET https://provisioning.commercelayer.io/api/organizations

Example

The following request fetches a collection of organizations:

curl -g -X GET \
  'https://provisioning.commercelayer.io/api/organizations/' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer {{your_access_token}}'

On success, the API responds with a 200 OK status code, returning a paginated collection of resource objects:

{
  "data": [
    {
      "id": "xYZkjABcde",
      "type": "organizations",
      "links": {
        "self": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde"
      },
      "attributes": {
        "name": "The Blue Brand",
        "slug": "the-blue-brand",
        "domain": "the-blue-brand.commercelayer.io",
        "support_phone": "+01 30800857",
        "support_email": "support@bluebrand.com",
        "logo_url": "https://bluebrand.com/img/logo.svg",
        "favicon_url": "https://bluebrand.com/img/favicon.ico",
        "primary_color": "#C8984E",
        "contrast_color": "#FFFFCC",
        "gtm_id": "GTM-5FJXX6",
        "gtm_id_test": "GTM-5FJXX7",
        "region": "eu-west-1",
        "can_switch_live": false,
        "subscription_info": {
          "plan_type": "growth",
          "limits": {
            "markets": 5,
            "skus": 10000,
            "organizations": 2,
            "memberships": 5
          },
          "totals": {
            "organizations": 1,
            "markets": 0,
            "memberships": 2,
            "skus": 0
          }
        },
        "config": {
          "mfe": {
            "language": "it-IT",
            "default": {
              "links": {
                "cart": "https://cart.example.com/:order_id?accessToken=:access_token",
                "checkout": "https://checkout.example.com/:order_id?accessToken=:access_token",
                "identity": "https://example.com/login",
                "microstore": "https://example.com/microstore/?accessToken=:access_token",
                "my_account": "https://example.com/my-custom-account?accessToken=:access_token"
              },
              "checkout": {
                "optional_billing_info": false,
                "thankyou_page": "https://example.com/thanks/:lang/:order_id",
                "billing_countries": [
                  {
                    "value": "ES",
                    "label": "Espana"
                  },
                  {
                    "value": "IT",
                    "label": "Italia"
                  },
                  {
                    "value": "US",
                    "label": "Unites States of America"
                  }
                ],
                "shipping_countries": [
                  {
                    "value": "ES",
                    "label": "Espana"
                  },
                  {
                    "value": "IT",
                    "label": "Italia"
                  },
                  {
                    "value": "US",
                    "label": "Unites States of America"
                  }
                ],
                "billing_states": {
                  "FR": [
                    {
                      "value": "PA",
                      "label": "Paris"
                    },
                    {
                      "value": "LY",
                      "label": "Lyon"
                    },
                    {
                      "value": "NI",
                      "label": "Nice"
                    },
                    {
                      "value": "MA",
                      "label": "Marseille"
                    },
                    {
                      "value": "BO",
                      "label": "Bordeaux"
                    }
                  ]
                },
                "shipping_states": {
                  "FR": [
                    {
                      "value": "PA",
                      "label": "Paris"
                    },
                    {
                      "value": "LY",
                      "label": "Lyon"
                    },
                    {
                      "value": "NI",
                      "label": "Nice"
                    },
                    {
                      "value": "MA",
                      "label": "Marseille"
                    },
                    {
                      "value": "BO",
                      "label": "Bordeaux"
                    }
                  ]
                },
                "default_country": "US"
              },
              "urls": {
                "privacy": "https://example.com/privacy/:lang",
                "terms": "https://example.com/terms/:lang"
              }
            },
            "market:id:ZKcv13rT": {
              "links": {
                "cart": "https://example.com/custom-cart/:order_id?accessToken=:access_token"
              },
              "checkout": {
                "thankyou_page": "https://example.com/thanks/:order_id"
              }
            }
          }
        },
        "api_auth_redirect": true,
        "api_rules_engine": false,
        "api_rules_engine_max_conditions_size": 150,
        "api_rules_engine_max_rules_size": 15,
        "api_new_auth": true,
        "api_purge_single_resource": false,
        "api_max_regex_length": 5000,
        "addresses_phone_required": true,
        "orders_min_refresh_lapse": 0.0,
        "orders_autorefresh_cutoff_test": 50,
        "orders_autorefresh_cutoff_live": 500,
        "orders_number_editable_test": false,
        "orders_number_editable_live": false,
        "orders_number_as_reference": true,
        "orders_invalid_coupon_errors": true,
        "bundles_max_items_count": 10,
        "coupons_min_code_length": 8,
        "coupons_max_code_length": 40,
        "gift_cards_min_code_length": 8,
        "gift_cards_max_code_length": 40,
        "cleanups_max_concurrent_count": 10,
        "exports_max_concurrent_count": 10,
        "imports_max_concurrent_count": 10,
        "imports_purge_cache": true,
        "imports_skip_errors": false,
        "promotions_max_concurrent_count": 10,
        "promotions_max_conditions_size": 150,
        "promotions_max_rules_size": 15,
        "price_lists_max_conditions_size": 150,
        "price_lists_max_rules_size": 15,
        "imports_trigger_webhooks": 0,
        "discount_engines_enabled": false,
        "discount_engines_errors": false,
        "tags_max_name_length": 25,
        "tags_max_allowed_number": 10,
        "tax_calculators_errors": false,
        "external_promotions_errors": false,
        "created_at": "2018-01-01T12:00:00.000Z",
        "updated_at": "2018-01-01T12:00:00.000Z",
        "reference": "ANY-EXTERNAL-REFEFERNCE",
        "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
        "metadata": {
          "foo": "bar"
        }
      },
      "relationships": {
        "memberships": {
          "links": {
            "self": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/relationships/memberships",
            "related": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/memberships"
          }
        },
        "roles": {
          "links": {
            "self": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/relationships/roles",
            "related": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/roles"
          }
        },
        "permissions": {
          "links": {
            "self": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/relationships/permissions",
            "related": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/permissions"
          }
        },
        "api_credentials": {
          "links": {
            "self": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/relationships/api_credentials",
            "related": "https://provisioning.commercelayer.io/api/organizations/xYZkjABcde/api_credentials"
          }
        }
      }
    },
    {
      "other": "... 9 organizations (first page)"
    }
  ],
  "meta": {
    "record_count": 140,
    "page_count": 14
  },
  "links": {
    "first": "https://provisioning.commercelayer.io/organizations?page[number]=1&page[size]=10",
    "next": "https://provisioning.commercelayer.io/organizations?page[number]=2&page[size]=10",
    "last": "https://provisioning.commercelayer.io/organizations?page[number]=14&page[size]=10"
  }
}

Remember that when you fetch a list of resources you get result.

Sortable fields

The list of organizations can be by the following fields:

  • name

  • slug

  • domain

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

Filterable fields

Attributes

  • name

  • slug

  • domain

  • region

  • id

  • created_at

  • updated_at

  • reference

  • reference_origin

  • metadata

Relationships

  • memberships

  • roles

  • permissions

  • api_credentials

The list of organizations can be by the following fields:

paginated
sorted
filtered