How do I get a full list of organisations via the API?

Learn how to retrieve a full list of available organisations via the Expansive API

Understanding which organisations are available to you is important. When creating records such as sites the oragnisation must be set correctly so your billing information for any work orders happening there is accurate.

Resource

/v2/organisations

Method

GET

Headers

Key Value
Authorization Bearer <TOKEN> (find out more)
Content-Type application/vnd.api+json
 

Expected Response

200 OK
{
  "jsonapi": {
    "version": "1.0"
  },
  "data": [
    {
      "type": "organisations",
      "id": "1",
      "attributes": {
        "created_at": "2024-02-14T11:27:09.000000Z",
        "enabled": true,
        "invoice_group_id": 3,
        "name": "Organisation 27303",
        "prefix": null,
        "updated_at": "2024-02-14T11:27:09.000000Z"
      },
      "relationships": {
        "Sites": {
          "links": {
            "related": "http://localhost:8080/api/v2/organisations/1/sites",
            "self": "http://localhost:8080/api/v2/organisations/1/relationships/sites"
          }
        }
      },
      "links": {
        "self": "http://localhost:8080/api/v2/organisations/1"
      }
    },
    {
      "type": "organisations",
      "id": "2",
      "attributes": {
        "created_at": "2024-02-14T11:27:09.000000Z",
        "enabled": true,
        "invoice_group_id": 2,
        "name": "Organisation 33307",
        "prefix": null,
        "updated_at": "2024-02-14T11:27:09.000000Z"
      },
      "relationships": {
        "Sites": {
          "links": {
            "related": "http://localhost:8080/api/v2/organisations/2/sites",
            "self": "http://localhost:8080/api/v2/organisations/2/relationships/sites"
          }
        }
      },
      "links": {
        "self": "http://localhost:8080/api/v2/organisations/2"
      }
    },
    {
      "type": "organisations",
      "id": "3",
      "attributes": {
        "created_at": "2024-02-14T11:27:09.000000Z",
        "enabled": true,
        "invoice_group_id": 1,
        "name": "Organisation 95800",
        "prefix": null,
        "updated_at": "2024-02-14T11:27:09.000000Z"
      },
      "relationships": {
        "Sites": {
          "links": {
            "related": "http://localhost:8080/api/v2/organisations/3/sites",
            "self": "http://localhost:8080/api/v2/organisations/3/relationships/sites"
          }
        }
      },
      "links": {
        "self": "http://localhost:8080/api/v2/organisations/3"
      }
    },
    {
      "type": "organisations",
      "id": "4",
      "attributes": {
        "created_at": "2024-02-14T11:27:09.000000Z",
        "enabled": true,
        "invoice_group_id": 1,
        "name": "Organisation 71942",
        "prefix": null,
        "updated_at": "2024-02-14T11:27:09.000000Z"
      },
      "relationships": {
        "Sites": {
          "links": {
            "related": "http://localhost:8080/api/v2/organisations/4/sites",
            "self": "http://localhost:8080/api/v2/organisations/4/relationships/sites"
          }
        }
      },
      "links": {
        "self": "http://localhost:8080/api/v2/organisations/4"
      }
    },
    {
      "type": "organisations",
      "id": "5",
      "attributes": {
        "created_at": "2024-02-14T11:27:09.000000Z",
        "enabled": true,
        "invoice_group_id": 3,
        "name": "Organisation 94573",
        "prefix": null,
        "updated_at": "2024-02-14T11:27:09.000000Z"
      },
      "relationships": {
        "Sites": {
          "links": {
            "related": "http://localhost:8080/api/v2/organisations/5/sites",
            "self": "http://localhost:8080/api/v2/organisations/5/relationships/sites"
          }
        }
      },
      "links": {
        "self": "http://localhost:8080/api/v2/organisations/5"
      }
    }
  ]
}