API-ի միջոցով հնարավոր է ստանալ (GET), ստեղծել (POST), թարմացնել (PUT) և հեռացնել (DELETE) գործընկերների խմբերը։
URI
|
https://api.armsoft.am/trade/v1/directories/partnersgroups
|
Տվյալ ռեսուրսի համար պահանջվում է ավտորիզացիա՝ API բանալու օգտագործմամբ։ Այն անհրաժեշտ է տեղադրել հարցման գլխագրի apiKey դաշտում. API բանալին ստանալու համար անհրաժեշտ է կատարել API գաղտնի բանալու ստացում էջում նկարագրված քայլերը:
-H 'apiKey: hJk:|^&99։՛(=0#biWc:'
|
Գործընկերների խմբեր օբյեկտի դաշտերը
Ստորև ներկայացված է օբյեկտի դաշտերի նկարագրությունը.
Անվանում
|
Տեսակ
|
Կիրառումը
|
Նկարագրություն
|
code
|
String(5)
|

|
Գործընկերոջ խմբի կոդ։
|
name
|
String(50)
|

|
Գործընկերոջ խմբի անվանում։
|
parent
|
String(5)
|

|
Կուտակիչ խմբի կոդ։
|
path
|
String
|

|
Գործընկերոջ խմբի անվանումը, որի մեջ մտնում է տվյալ ենթախումբը։
|
POST
|
Request
curl -X 'POST' \
'https://smetest.armsoft.am/tradetest/v1/directories/partnersgroups' \
-H 'accept: text/plain' \
-H 'Accept-Language: hy-AM' \
-H 'apiKey: If;]_v&aEh06.L$h.ipU ' \
-H 'Content-Type: application/json' \
-d '{
"code": "01",
"name": "Մատակարարներ",
"parent": "",
"path": "011"
}'
Response body (201 Created)
{
"code": "01",
"name": "Մատակարարներ",
"parent": "",
"path": "011"
}
|
|
GET
|
Request
curl -X 'GET' \
'https://smetest.armsoft.am/tradetest/v1/directories/partnersgroups' \
-H 'accept: text/plain' \
-H 'Accept-Language: hy-AM' \
-H 'apiKey: If;]_v&aEh06.L$h.ipU '
Response body (200 OK)
[
{
"code": "01",
"name": "Մատակարարներ",
"parent": "",
"path": "011"
},
]
|
|
GET
|
Request
curl -X 'GET' \
'https://smetest.armsoft.am/tradetest/v1/directories/partnersgroups/01' \
-H 'accept: */*' \
-H 'Accept-Language: hy-AM' \
-H 'apiKey: If;]_v&aEh06.L$h.ipU '
Response body (200 OK)
[
{
"code": "01",
"name": "Մատակարարներ",
"parent": "",
"path": "011"
}
]
|
|
PUT
|
Request
curl -X 'PUT' \
'https://smetest.armsoft.am/tradetest/v1/directories/partnersgroups/01' \
-H 'accept: text/plain' \
-H 'Accept-Language: hy-AM' \
-H 'apiKey: If;]_v&aEh06.L$h.ipU ' \
-H 'Content-Type: application/json' \
-d '{
"code": "01",
"name": "Մատակարարներ",
"parent": "",
"path": "011"
}'
Response body (200 OK)
{
"code": "01",
"name": "Մատակարարներ նոր",
"parent": "",
"path": "011"
}
|
|
DELETE
|
Request
curl -X 'DELETE' \
'https://smetest.armsoft.am/tradetest/v1/directories/partnersgroups/01' \
-H 'accept: */*' \
-H 'Accept-Language: hy-AM' \
-H 'apiKey: If;]_v&aEh06.L$h.ipU '
Response body (200 OK)
|
|