swagger: '2.0' info: title: Automile ClientApi ResourceOwnerOrganization API version: v1 tags: - name: ResourceOwnerOrganization paths: /v1/resourceowner/organization: get: tags: - ResourceOwnerOrganization summary: Get a the details of the organizationt he user is assoicates with operationId: GetResourceOwnerOrganization produces: - text/plain - application/json - text/json responses: '200': description: The organization model is returned schema: $ref: '#/definitions/OrganizationModel' '500': description: Internal server error security: - oauth2: [] put: tags: - ResourceOwnerOrganization summary: Updates the organization description: This will update the organization with the new model. operationId: EditResourceOwnerOrganization consumes: - application/json - text/json - application/*+json produces: - text/plain - application/json - text/json parameters: - in: body name: body description: The organization model containing the changes schema: $ref: '#/definitions/OrganizationEditModel' responses: '200': description: The organization was saved schema: $ref: '#/definitions/HttpResponseMessage' '500': description: Internal server error '404': description: You are not authorized to edit the organization security: - oauth2: [] /v1/resourceowner/organization/hierarchy: get: tags: - ResourceOwnerOrganization summary: Get the organization hierarchy operationId: GetResourceOrganizationHierarchy produces: - text/plain - application/json - text/json responses: '200': description: The organization hierarchy is returned schema: type: array items: $ref: '#/definitions/OrganizationNodeModel' '500': description: Internal server error '403': description: Request is forbidden, meaning you dont' have access to this contact '404': description: Contact does not exist security: - oauth2: [] definitions: HttpRequestMessage: type: object properties: Version: $ref: '#/definitions/Version' VersionPolicy: format: int32 enum: - 0 - 1 - 2 type: integer Content: $ref: '#/definitions/HttpContent' Method: $ref: '#/definitions/HttpMethod' RequestUri: format: uri type: string Headers: type: array items: $ref: '#/definitions/StringStringIEnumerableKeyValuePair' readOnly: true Properties: type: object additionalProperties: {} readOnly: true Options: type: object additionalProperties: {} readOnly: true additionalProperties: false OrganizationEditModel: type: object properties: OrganizationName: type: string LegalIdentificationNumber: type: string VATNumber: type: string BillingAddress: $ref: '#/definitions/AddressModel' ShipmentAddress: $ref: '#/definitions/AddressModel' Culture: type: string UnitType: format: int32 enum: - 0 - 1 - 2 type: integer additionalProperties: false HttpContent: type: object properties: Headers: type: array items: $ref: '#/definitions/StringStringIEnumerableKeyValuePair' readOnly: true additionalProperties: false HttpResponseMessage: type: object properties: Version: $ref: '#/definitions/Version' Content: $ref: '#/definitions/HttpContent' StatusCode: format: int32 enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer ReasonPhrase: type: string Headers: type: array items: $ref: '#/definitions/StringStringIEnumerableKeyValuePair' readOnly: true TrailingHeaders: type: array items: $ref: '#/definitions/StringStringIEnumerableKeyValuePair' readOnly: true RequestMessage: $ref: '#/definitions/HttpRequestMessage' IsSuccessStatusCode: type: boolean readOnly: true additionalProperties: false OrganizationNodeModel: type: object properties: OrganizationNodeId: format: int32 type: integer Name: type: string ParentOrganizationNodeId: format: int32 type: integer Children: type: array items: $ref: '#/definitions/OrganizationNodeModel' HasChildren: type: boolean readOnly: true additionalProperties: false OrganizationModel: type: object properties: OrganizationName: type: string LegalIdentificationNumber: type: string VATNumber: type: string BillingAddress: $ref: '#/definitions/AddressModel' ShipmentAddress: $ref: '#/definitions/AddressModel' Culture: type: string UnitType: format: int32 enum: - 0 - 1 - 2 type: integer IsHierarchyEnabled: type: boolean ISO4217CurrencyCode: type: string OrganizationId: format: int32 type: integer additionalProperties: false StringStringIEnumerableKeyValuePair: type: object properties: Key: type: string Value: type: array items: type: string additionalProperties: false AddressModel: required: - AddressLine2 - City - ISO3166CountryCode - ZipCode type: object properties: AddressId: format: int32 type: integer CompanyName: type: string ContactNameAtAddress: type: string AddressLine2: minLength: 1 type: string AddressLine3: type: string AddressLine4: type: string ZipCode: minLength: 1 type: string City: minLength: 1 type: string StateOrProvince: type: string ISO3166CountryCode: minLength: 1 type: string additionalProperties: false HttpMethod: type: object properties: Method: type: string additionalProperties: false Version: type: object properties: Major: format: int32 type: integer readOnly: true Minor: format: int32 type: integer readOnly: true Build: format: int32 type: integer readOnly: true Revision: format: int32 type: integer readOnly: true MajorRevision: format: int32 type: integer readOnly: true MinorRevision: format: int32 type: integer readOnly: true additionalProperties: false securityDefinitions: oauth2: type: oauth2 flow: implicit authorizationUrl: https://api.automile.com/login/ scopes: read: Read access to protected resources write: Write access to protected resources description: OAuth2 Implicit Grant