Identifikimi
Te gjitha endpoint-et kerkojne identifikim. Nuk ka asnje endpoint publik.
Token-i i perdoruesit#
Token-i eshte i perdoruesit, jo i kompanise, dhe gjenerohet nga fature.al te Konfigurime > API Tokens. Ai identifikon njeheresh perdoruesin dhe biznesin ne emer te te cilit leshohen faturat.
Authorization: Bearer TOKEN_I_JUAJ
Kredencialet e aplikacionit#
Nje ofrues qe shet nje program per shume biznese merr edhe nje cift kredencialesh, te cilat dergohen krahas token-it:
X-Client-Id: ft_id_...
X-Client-Secret: ft_sk_...
Te dyja bashke pergjigjen dy pyetjeve te ndryshme:
| Cfare dergoni | Cfare tregon |
|---|---|
Authorization |
Kush po e perdor programin |
X-Client-Id me X-Client-Secret |
Cili program po therret |
Kredencialet nuk e zevendesojne token-in dhe nuk hapin asnje te drejte me vete.
Nje kerkese e plote#
curl 'https://fature.al/api/v1/account' \
-H 'Authorization: Bearer TOKEN_I_JUAJ' \
-H 'X-Client-Id: ft_id_...' \
-H 'X-Client-Secret: ft_sk_...' \
-H 'Accept: application/json'
Kur nuk kalon#
401: token-i mungon, eshte i gabuar ose eshte revokuar. Kontrolloni qe header-i quhetAuthorizationdhe qe fjalaBearereshte para tij.403: token-i eshte i vlefshem, por llogaria nuk ka te drejten per kete veprim, ose abonimi ka mbaruar.
Kredencialet e derguara gabim refuzohen gjithmone me 401, edhe kur dergimi i tyre
nuk eshte ende i detyrueshem per aplikacionin tuaj.
Rotacioni#
Kur nje sekret rrjedh, rotacioni e shfuqizon ate menjehere, pa periudhe mbivendosjeje. Client id-ja mbetet e njejta, prandaj sherbimi juaj rifillon me nje vlere te vetme te ndryshuar.
Set up to test
Put a credential here and every Try it on this site will send it. Requests go from this browser straight to the API — the credential is never sent anywhere else, and never appears in the examples you copy.
Regjistrimi eshte falas.
Regjistrohu ne fature.al