# Spend Returns spend data about the specified company. It's also possible to specify what fields from the API should be returned. By default, only some fields are returned. Endpoint: POST /data-api/v1/company/spend Security: authorization ## Request fields (application/json): - `fields` (array) A list of data points to be returned in the API response. Enum: "company_id", "spend", "category_id", "category_name", "category_description", "country_code", "country_name" - `filters` (object, required) Filters for company spend data. Must provide either company_id OR company_ids, but not both. Example: {"category_ids":["03B36D42E7F8E60BE58BA4356B6AF40C","3B7D551F81A8A448041BF23C85E3D21B"],"company_id":"1698C53EBC888758570396E0334965C1"} - `filters.category_ids` (array) Array of category IDs to filter by Example: ["03B36D42E7F8E60BE58BA4356B6AF40C","3B7D551F81A8A448041BF23C85E3D21B"] - `filters.company_id` (any) A unique hexadecimal identifier for the desired field. Example: "1698C53EBC888758570396E0334965C1" - `filters.company_ids` (array) Array of company IDs Example: ["1698C53EBC888758570396E0334965C1"] - `limit` (integer) The number of records to return in the request. - `offset` (integer) Used for paginating records. - `sorts` (array) Example: [{"direction":"DESC","field":"spend"}] - `sorts.direction` (string, required) Sort direction Enum: "ASC", "DESC" - `sorts.field` (string, required) Enum: "spend", "category_id", "country_code" ## Response 200 fields (application/json): - `count` (integer) - `data` (array) - `data.category_description` (string) - `data.category_id` (string) - `data.category_name` (string) - `data.company_id` (string) - `data.country_code` (string) - `data.country_name` (string) - `data.spend` (integer) ## Response 401 fields (application/json): - `errors` (array) - `errors.detail` (string, required) Example: "The token provided is not valid" - `errors.source` (object) - `errors.title` (string, required) Example: "Unauthorized" ## Response 422 fields (application/json): - `errors` (array, required) - `errors.detail` (string, required) Example: "null value where string expected" - `errors.source` (object, required) - `errors.source.pointer` (string, required) Example: "/data/attributes/petName" - `errors.title` (string, required) Example: "Invalid value"