Create Brand

Create Brand

POST https://environment.monterosa.cloud/api/v2/brands

Headers

NameTypeDescription

Content-Type

string

application/vnd.api+json

Authentication

string

Bearer token

Request Body

NameTypeDescription

name

string

Brand name

image_url

string

Brand image URL

{
  "data": {
    "id": "e528eeeb-9b0d-4625-9243-ab7ba8cdd612",
    "type": "brands",
    "attributes": {
      "name": "Monterosa",
      "image_url": null,
      "total_interactions": 0,
      "projects_count": 0,
      "apps_count": 0
    },
    "relationships": {
      "organisation": {
        "data": {
          "id": "3688b1f3-1661-4ae3-b304-32097da06b63",
          "type": "organisations"
        }
      },
      "projects": {
        "links": {
          "related": "https://environment.lvis.io/api/v2/brands/e528eeeb-9b0d-4625-9243-ab7ba8cdd612/projects"
        }
      }
    },
    "links": {
      "self": "https://environment.lvis.io/api/v2/brands/e528eeeb-9b0d-4625-9243-ab7ba8cdd612"
    }
  }
}

Example

// POST /api/v2/organisations/3688b1f3-1661-4ae3-b304-32097da06b63/brands
// Host: environment.monterosa.cloud
// Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb
// Content-Type: application/vnd.api+json

{
  "data": {
    "type": "brands",
    "relationships": {
      "organisation": {
        "data": {
          "type": "organisations",
          "id": "1d21c625-4db0-43e1-ac65-ce8a385e1c64"
        }
      }
    },
    "attributes": {
      "name": "Monterosa",
      "image_url": "https://monterosa.co.uk/brand.jpg"
    }
  }
}

Validation error on account creation

Here in the example, we are trying to create a brand with name "New Brand" that already exists.

Returned response with 422(Unprocessable Entity) status and error message.

// POST /api/v2/organisations/3688b1f3-1661-4ae3-b304-32097da06b63/brands
// Host: environment.monterosa.cloud
// Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb
// Content-Type: application/vnd.api+json

{
  "data": {
    "type": "brands",
    "relationships": {
      "organisation": {
        "data": {
          "type": "organisations",
          "id": "1d21c625-4db0-43e1-ac65-ce8a385e1c64"
        }
      }
    },
    "attributes": {
      "name": "New Brand",
      "image_url": "https://monterosa.co.uk/brand.jpg"
    }
  }
}