فضاها

یادداشت ها
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
لیست

API endpoint:

GET
https://links.pkso.ir/api/v1/spaces

درخواست نمونه:

curl --location --request GET 'https://links.pkso.ir/api/v1/spaces' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
نوع
توضیحات
search
اختیاری string
The search query.
search_by
اختیاری string
جستجو. مقادیر ممکن عبارتند از: name for نام. Defaults to: name.
sort_by
اختیاری string
ترتیب . مقادیر ممکن عبارتند از: id for تاریخ ایجاد, name for نام. Defaults to: id.
sort
اختیاری string
مرتب سازی. مقادیر ممکن عبارتند از: desc for نزولی, asc for صعودی. Defaults to: desc.
per_page
اختیاری int
نتایج در هر صفحه. مقادیر ممکن عبارتند از: 10, 25, 50, 100. Defaults to: 10.
نمایش

API endpoint:

GET
https://links.pkso.ir/api/v1/spaces/{id}

درخواست نمونه:

curl --location --request GET 'https://links.pkso.ir/api/v1/spaces/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
فروشگاه

API endpoint:

POST
https://links.pkso.ir/api/v1/spaces

درخواست نمونه:

curl --location --request POST 'https://links.pkso.ir/api/v1/spaces' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
Parameter
نوع
توضیحات
name
ضروری string
The space name.
color
اختیاری integer
The color code. مقادیر ممکن عبارتند از: 1, 2, 3, 4, 5, 6. Defaults to: 1.
بروزرسانی

API endpoint:

PUT PATCH
https://links.pkso.ir/api/v1/spaces/{id}

درخواست نمونه:

curl --location --request PUT 'https://links.pkso.ir/api/v1/spaces/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
نوع
توضیحات
name
اختیاری string
The space name.
color
اختیاری integer
The color code. مقادیر ممکن عبارتند از: 1, 2, 3, 4, 5, 6.
حذف

API endpoint:

DELETE
https://links.pkso.ir/api/v1/spaces/{id}

درخواست نمونه:

curl --location --request DELETE 'https://links.pkso.ir/api/v1/spaces/{id}' \
--header 'Authorization: Bearer {api_key}'