Appearance
Categories API
The Categories API provides endpoints to get categories.
Get Categories (JSON)
Endpoint:
GET /{companyId}/categories/jsonQuery Parameters:
start_date(optional) - Filter receipts from this date.end_date(optional) - Filter receipts up to this date.order_by(optional, default:created_at) - Sorting field.order_direction(optional, default:desc) - Sorting order.
Example Request:
sh
curl -X GET "https://app.masrapp.net/integration/v1/{companyId}/categories/json" \
-H "X-API-KEY: your_api_key"Example Response:
json
{
"data": [
{
"id": "9e35ec84-8346-43a8-a157-19817ff749da",
"code": "SEY01",
"name": "Seyehat ve Konaklama",
"status": 3,
"created_at": "2025-02-14T14:46:25.000000Z"
},
{
"id": "9e35ec6a-18d5-4058-9121-11baade02fcf",
"code": "YAZ01",
"name": "Yazılım ve Teknoloji",
"status": 1,
"created_at": "2025-02-14T14:46:08.000000Z"
},
{
"id": "9e35ec4e-155c-45e4-9712-30d922bb8c6a",
"code": "OF01",
"name": "Ofis ve İşletme Giderleri",
"status": 1,
"created_at": "2025-02-14T14:45:49.000000Z"
},
{
"id": "9e35ec37-b08c-462f-9207-207682b87f5b",
"code": "PAZ01",
"name": "Pazarlama ve Reklam",
"status": 1,
"created_at": "2025-02-14T14:45:35.000000Z"
}
],
"links": {
"first": "https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/json?page=1",
"last": "https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/json?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "\" Öncesi",
"active": false
},
{
"url": "https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/json?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Sonraki \"",
"active": false
}
],
"path": "https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/json",
"per_page": 50,
"to": 4,
"total": 4
}
}Get Categories (XML)
Endpoint:
GET /{companyId}/categories/xmlExample Request:
sh
curl -X GET "https://app.masrapp.net/integration/v1/{companyId}/categories/xml" \
-H "X-API-KEY: your_api_key"Example Response:
xml
<?xml version="1.0" encoding="utf-8"?>
<root>
<data>
<item>
<id>9e35ec84-8346-43a8-a157-19817ff749da</id>
<code>SEY01</code>
<name>Seyehat ve Konaklama</name>
<status>3</status>
<created_at>2025-02-14T14:46:25.000000Z</created_at>
</item>
<item>
<id>9e35ec6a-18d5-4058-9121-11baade02fcf</id>
<code>YAZ01</code>
<name>Yazılım ve Teknoloji</name>
<status>1</status>
<created_at>2025-02-14T14:46:08.000000Z</created_at>
</item>
<item>
<id>9e35ec4e-155c-45e4-9712-30d922bb8c6a</id>
<code>OF01</code>
<name>Ofis ve İşletme Giderleri</name>
<status>1</status>
<created_at>2025-02-14T14:45:49.000000Z</created_at>
</item>
<item>
<id>9e35ec37-b08c-462f-9207-207682b87f5b</id>
<code>PAZ01</code>
<name>Pazarlama ve Reklam</name>
<status>1</status>
<created_at>2025-02-14T14:45:35.000000Z</created_at>
</item>
</data>
<links>
<first>https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/xml?page=1</first>
<last>https://app.masrapp.net/integration/v1/9e35e991-b733-4a65-9e2f-152adf94a013/categories/xml?page=1</last>
<prev></prev>
<next></next>
</links>
<meta>
<current_page>1</current_page>
<from>1</from>
<last_page>1</last_page>
<per_page>50</per_page>
<to>4</to>
<total>4</total>
</meta>
</root>