Retrieve the organization
How to fetch the organization via API
To fetch the organization, send a GET request to the /api/organization endpoint.
Request
GET https://yourdomain.commercelayer.io/api/organization
Example
The following request fetches the organization in scope:
curl -g -X GET \
  'https://yourdomain.commercelayer.io/api/organization/' \
  -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 single resource object:
{
  "data": {
    "id": "XAyRWNUzyN",
    "type": "organizations",
    "attributes": {
      "name": "The Blue Brand",
      "slug": "the-blue-brand",
      "domain": "the-blue-brand.commercelayer.io",
      "support_phone": "+01 30800857",
      "support_email": "[email protected]",
      "logo_url": "https://bluebrand.com/img/logo.svg",
      "favicon_url": "https://bluebrand.com/img/favicon.ico",
      "primary_color": "#C8984E",
      "gtm_id": "GTM-5FJXX6",
      "gtm_id_test": "GTM-5FJXX7",
      "config": {
        "mfe": {
          "default": {
            "links": {
              "cart": "https://cart.example.com/:order_id?accessToken=:access_token",
              "checkout": "https://checkout.example.com/:order_id?accessToken=:accessToken",
              "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": {
              "thankyou_page": "https://example.com/thanks/:lang/:orderId",
              "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_avs_check": true,
      "addresses_phone_required": true,
      "orders_sales_channel_guest_only": true,
      "orders_min_rebuild_shipments_lapse": 0.0,
      "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,
      "orders_invalid_gift_card_errors": true,
      "orders_validate_shipping_stock": false,
      "bundles_max_items_count": 10,
      "coupons_min_code_length": 8,
      "coupons_max_code_length": 40,
      "gift_cards_exact_code_matching": false,
      "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,
      "inventory_models_max_stock_locations_cutoff": 10,
      "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,
      "external_prices_errors": true,
      "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": {
      "event_stores": {
        "links": {
          "self": "https://yourdomain.commercelayer.io/api/organization/XAyRWNUzyN/relationships/event_stores",
          "related": "https://yourdomain.commercelayer.io/api/organization/XAyRWNUzyN/event_stores"
        }
      }
    },
    "meta": {
      "trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74"
    }
  }
}Last updated

