This section describes the API of the organization resource. Organizations represent a group of users which have expenses. Generally, organizations represent the company or corporation the group of users belong to.
Parameters
id:
integer
name:
string
restricted_tags:
boolean
expired:
boolean
members_count:
integer
created_at:
string
updated_at:
string
members_count:
integer
identifier_document:
string
default_liquidation_kind:
string
logo:
array of object
array of styles and URL of the logo
_links:
array of object
array of links of the organization
Example Organization
{"id":1,"name":"Organization example 1","restricted_tags":false,"expired":false,"members_count":3,"identifier_document":'88146658000157',"default_liquidation_kind":'reimbursement',"created_at":"2014-06-03T14:17:56Z","updated_at":"2014-06-03T14:17:56Z","logo":[{"style":"original","url":"https://rexpense-uploads.s3.amazonaws.com/organization_logo/1/original/logo.png","expiration":"2014-06-27T20:31:43Z"},{"style":"medium","url":"https://rexpense-uploads.s3.amazonaws.com/organization_logo/1/medium/logo.png","expiration":"2014-06-27T20:31:43Z"},{"style":"thumb","url":"https://rexpense-uploads.s3.amazonaws.com/organization_logo/1/thumb/logo.png","expiration":"2014-06-27T20:31:43Z"}{"style":"tiny","url":"https://rexpense-uploads.s3.amazonaws.com/organization_logo/1/tiny/logo.png","expiration":"2014-06-27T20:31:43Z"}],"_links":[{"rel":"self","method":"GET","url":"https://app.rexpense.com/api/v1/organizations/1"},{"rel":"update","method":"PUT","url":"https://app.rexpense.com/api/v1/organizations/1"},{"rel":"partial_update","method":"PATCH","url":"https://app.rexpense.com/api/v1/organizations/1"},{"rel":"destroy","method":"DELETE","url":"https://app.rexpense.com/api/v1/organizations/1"}]}
Retrieve all organizations that a user is member of. It will return a JSON containing the name of the resource
with an array of the objects requested. The fields of the organizations can be found in the Organization section.
There are two ways to update an organization: partially or fully. If you'd like to change just one or
a few attributes, you have to use the HTTP method PATCH. If you use the HTTP method PUT, you'll have to
pass all attributes of the organization. This behaviour is the same for all resources in the Rexpense API.
Parameters
name:
stringrequired
file:
string
_destroy:
boolean
To update an existing organization logo, you have to provide the parameter file. This parameter
must be an URL of the logo. This URL may be achieve following the steps
in Uploads section.
To remove the logo, you have to pass the _destroy parameter with value true.