Էջավորում

Ուղղորդիչ:  REST API (ամպային տարբերակ) >

Էջավորում

Previous pageReturn to chapter overviewNext page

Բացել/Փակել թաքցված տեքստը

Այն դեպքերում, երբ հարցումների արդյունքում վերադարձվող տվյալների քանակը մեծ է, API-ն օգտագործում է էջավորման մեխանիզմ։ Էջավորումը թույլ է տալիս մեծ ծավալի տվյալները ստանալ մի քանի հաջորդական հարցումների միջոցով՝ մաս-մաս։ Յուրաքանչյուր հարցման արդյունքում վերադարձվում է տվյալների մի մասը։ Եթե կան դեռ չվերադարձված գրառումներ, պատասխանում ներառվում են հատուկ դաշտեր, որոնք թույլ են տալիս շարունակել հաջորդ էջերի ստացումը։

 

Էջավորումը գործում է հետևյալ հարցումների դեպքում՝

Անվանում

Endpoint

Բոլոր փաստաթղթերը

URI: https://api.armsoft.am/trade/v1/journals/alldocuments/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Journals/post_v1_journals_alldocuments_nextpage

ՀԴՄ կտրոններ

URI: https://api.armsoft.am/trade/v1/journals/ecrchecks/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Journals/post_v1_journals_ecrchecks_nextpage

Ապրանքների մնացորդներ

URI: https://api.armsoft.am/trade/v1/reports/productsbalances/short/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_productsbalances_short_nextpage

Ապրանքների մնացորդներ (Ընդլայնված)

URI: https://api.armsoft.am/trade/v1/reports/productsbalances/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_productsbalances_nextpage

Գործընկերների մնացորդներ

URI: https://api.armsoft.am/trade/v1/reports/partnersbalances/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_partnersbalances_nextpage

Գնացուցակ

URI: https://api.armsoft.am/trade/v1/reports/pricelist/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_pricelist_nextpage

Վաճառքների վերլուծություն

URI: https://api.armsoft.am/trade/v1/reports/salesanalysis/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_salesanalysis_nextpage

Բոնուսների մնացորդներ

URI: https://api.armsoft.am/trade/v1/reports/bonusbalances/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Reports/post_v1_reports_bonusbalances_nextpage

Ապրանքներ և ծառայություններ

URI: https://api.armsoft.am/trade/v1/directories/products/list/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Products/post_v1_directories_products_list_nextpage

Չափման միավորներ

URI: https://api.armsoft.am/trade/v1/directories/products/measureunits/list/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Products/post_v1_directories_products_measureunits_list_nextpage

Գծիկավոր կոդեր

URI: https://api.armsoft.am/trade/v1/directories/barcodes/list/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Barcodes/post_v1_directories_barcodes_list_nextpage

Գործընկերներ

URI: https://api.armsoft.am/trade/v1/directories/partners/list/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Partners/post_v1_directories_partners_list_nextpage

Գործընկերների պայմանագրեր

URI: https://api.armsoft.am/trade/v1/directories/partners/contracts/list/nextpage

Swagger: https://api.armsoft.am/trade/swagger/index.html#/Partners/post_v1_directories_partners_contracts_list_nextpage

 

Էջավորման (Pagination) պարամետրեր

Անվանում

Նկարագրություն

pageSize

Սահմանում է մեկ հարցման արդյունքում վերադարձվող գրառումների քանակը։

Նվազագույն վերադարձվող քանակը 5000 տող է։

Եթե փոխանցված արժեքը փոքր է 5000-ից, համակարգը միևնույն է վերադարձնում է առնվազն 5000 գրառում։

Եթե pageSize = 0, վերադարձվում են բոլոր հասանելի տվյալները։

Առավելագույն սահմանաչափ ներկայումս սահմանված չէ։

id

Հարցման ունիկալ նույնացուցիչ է(GUID), որը գեներացվում է համակարգի կողմից և օգտագործվում է էջավորման համար։

Եթե hasMore = true, նույն id-ը պետք է օգտագործել հաջորդ հարցման մեջ՝ մնացած տվյալները ստանալու համար։

hasMore

Լոգիկական (boolean) դաշտ, որը ցույց է տալիս՝ արդյոք կան դեռ չվերադարձված գրառումներ։

true արժեքի դեպքում առկա են լրացուցիչ տվյալներ (կա հաջորդ էջ):

false արժեքի դեպքում բոլոր տվյալներն արդեն վերադարձված են:

 

Հաջորդ էջի ստացում (Next Page)

 

Եթե hasMore = true, հաջորդ էջի տվյալները ստանալու համար անհրաժեշտ է կատարել նոր հարցում՝ օգտագործելով նախորդ պատասխանում վերադարձված id արժեքը։

 

Request

Անվանում

Տեսակ

Կիրառումը

Նկարագրություն

id

UUID

*Required

Նախորդ հարցման նույնացուցիչը:

close

Boolean

*Required

Լոգիկական (boolean) պարամետր։

Ընդունում է հետևյալ արժեքները․

false - ստանալ հաջորդ էջը,

true - ավարտել սեսիան։

 

Օրինակ

Առաջին հարցում

POST

 

Հաջորդ էջի հարցում

 

POST