Skip to content

Organizations

ngoumard edited this page Jan 1, 2017 · 14 revisions

Organizations

Create organization

Endpoint

  • URI : /api/v1/organizations
  • Method : POST
  • Credentials : user
  • Values
  • name: Organization's name
  • country_id: Organization's country
  • base64_logo_data: Organization's logo encoded in base64
{
  "name": "Great company",
  "country_id": 1,
  "base64_logo_data": "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="
}

Action

Will try to create an organization. Will try to upload logo to s3.

Response

201 The created organization.

{
  "name": "Great company",
  "members": [
    {
      "role": "owner",
      "last_name": "MyLastName",
      "inserted_at": "2016-12-29T14:57:38Z",
      "id": 40,
      "first_name": "MyFirstName",
      "email": "my@email.com"
    }
  ],
  "id": 43,
  "country": {
    "name": "Australia",
    "id": 1
  },
  "logo_thumb_url": "https://s3.amazonaws.com/pomerol/organizations/51/thumb.png?v=63650491977",
  "logo_large_url": "https://s3.amazonaws.com/pomerol/organizations/51/large.png?v=63650491977"
}