Skip to main content
To perform a JSON:API request successfully, you must provide the correct Accept, Content-Type, and Authorization headers. See Client Requirements and Authentication for details.
GET /api/users HTTP/1.1
Accept: application/vnd.api+json
Authorization: Bearer <access_token>

X-Include header

The X-Include request header retrieves additional metadata such as total record counts. The following keys are supported:
HTTP MethodX-Include keyResponse headerDescription
anynoHateoasRemoves all HATEOAS-related links from the response.
GETtotalCountX-Include-Total-CountReturns the total number of entities.
DELETEtotalCountX-Include-Total-CountReturns the total number of entities.
DELETEdeletedCountX-Include-Deleted-CountReturns the number of deleted entities.

Example 1: Total number of existing records

Retrieve the total count of resource records. Request
GET /api/users HTTP/1.1
Accept: application/vnd.api+json
X-Include: totalCount
Response
HTTP/1.1 200 OK
X-Include-Total-Count: 49
Content-Type: application/vnd.api+json
Date: Fri, 23 Sep 2016 12:27:05 GMT
Content-Length: 585
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Example 2: Total number of deleted records

Request
DELETE /api/users HTTP/1.1
Accept: application/vnd.api+json
X-Include: deletedCount

Example 3: Delete with filter and retrieve deleted count

The query string filter specifies which records to delete. See Filters for details. Request
DELETE /api/users?filter[id]=21,22 HTTP/1.1
Accept: application/vnd.api+json
Response
HTTP/1.1 204 No Content
X-Include-Deleted-Count: 2
Date: Fri, 23 Sep 2016 12:38:47 GMT
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

Storefront-specific headers

The following request headers are available for the storefront API:
HTTP MethodRequest headerDescription
anyX-Localization-IDBy default, locale-sensitive data is returned in the locale selected for the current website. Use this header to specify a different locale. The list of available localization IDs can be retrieved via /api/localizations.
anyX-CurrencyBy default, currency-related data is returned in the currency selected for the current website. Use this header to specify a different currency. The list of available currency codes can be retrieved via /api/currencies. Note: This header is available for OroCommerce Enterprise Edition only.

Build docs developers (and LLMs) love