Important

You are browsing the documentation for version 4.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

Schema

All API access is over HTTP or HTTPS (depending on a server configuration) and is accessed from the http(s)://<hostname_of_your_oro_application>/api/<resource_name> All data is sent and received as JSON.

A typical request can be performed via curl or JSON sandbox.

Curl Example

1GET /api/users/1 HTTP/1.1
2
3curl -X "GET" -H "Accept: application/vnd.api+json"
4     -H "Authorization: Bearer ..."
5http://localhost.com/api/users/1

Please note that to simplify the representation of request examples in the document, a short format will be used, e.g.:

1GET /api/users/1 HTTP/1.1
2Accept: application/vnd.api+json

Typical response header

1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3Date: Mon, 19 Sep 2016 17:52:34 GMT
4Connection: keep-alive
5Status: 200 OK
6Content-Length: 5279
7Cache-Control: max-age=0, no-store

Typical response body

 1{ "data": {
 2    "type": "users",
 3    "id": "1",
 4    "attributes": {
 5        "title": null,
 6        "email": "admin@local.com",
 7        "firstName": "John",
 8        "enabled": true,
 9        "lastLogin": "2016-09-19T11:01:31Z",
10    },
11    "relationships": {
12        "owner": { "data": { "type": "businessunits", "id": "1"} },
13        "businessUnits": { "data": [ { "type": "businessunits", "id": "1" } ] },
14    }
15}}

Blank fields are included as null instead of being omitted.

Attributes or sub resources that are restricted are included as null as well.

All timestamps are returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.