KseF - JavaScript client for kse_f Krajowy System e-Faktur This SDK is automatically generated by the Swagger Codegen project:
- API version: 2.0.4
- Package version: 2.0.4
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen For more information, please visit https://ksef.mf.gov.pl
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install kse_f --save
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
var KseF = require('kse_f');
var defaultClient = KseF.ApiClient.instance;
// Configure API key authorization: SessionToken
var SessionToken = defaultClient.authentications['SessionToken'];
SessionToken.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SessionToken.apiKeyPrefix['SessionToken'] = "Token"
var api = new KseF.InterfejsyInteraktywneFakturyApi()
var kSeFReferenceNumber = "kSeFReferenceNumber_example"; // {String}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.onlineInvoiceInvoiceGet(kSeFReferenceNumber, callback);
All URIs are relative to https://ksef-test.mf.gov.pl/api
Class | Method | HTTP request | Description |
---|---|---|---|
KseF.InterfejsyInteraktywneFakturyApi | onlineInvoiceInvoiceGet | GET /online/Invoice/Get/{KSeFReferenceNumber} | Pobranie faktury |
KseF.InterfejsyInteraktywneFakturyApi | onlineInvoiceInvoiceSend | PUT /online/Invoice/Send | Wysyłka faktury |
KseF.InterfejsyInteraktywneFakturyApi | onlineInvoiceInvoiceStatus | GET /online/Invoice/Status/{InvoiceElementReferenceNumber} | Sprawdzenie statusu wysłanej faktury |
KseF.InterfejsyInteraktywnePatnociApi | onlinePaymentPaymentIdentifierGetReferenceNumbers | GET /online/Payment/Identifier/GetReferenceNumbers/{PaymentIdentifier} | Pobranie listy faktur dla identyfikatora płatności |
KseF.InterfejsyInteraktywnePatnociApi | onlinePaymentPaymentIdentifierRequest | POST /online/Payment/Identifier/Request | Wygenerowanie identyfikatora płatności |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsCredentialsContextGrant | POST /online/Credentials/ContextGrant | Nadanie poświadczeń kontekstowych |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsCredentialsContextRevoke | POST /online/Credentials/ContextRevoke | Odebranie poświadczeń kontekstowych |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsCredentialsGrant | POST /online/Credentials/Grant | Nadanie poświadczeń |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsCredentialsRevoke | POST /online/Credentials/Revoke | Odebranie poświadczeń |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsCredentialsStatus | GET /online/Credentials/Status/{CredentialsElementReferenceNumber} | Sprawdzenie statusu poświadczeń |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsGenerateToken | POST /online/Credentials/GenerateToken | Generowanie tokena autoryzacyjnego |
KseF.InterfejsyInteraktywnePowiadczeniaApi | onlineCredentialsRevokeToken | POST /online/Credentials/RevokeToken | Usunięcie tokena autoryzacyjnego |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionAuthorisationChallenge | POST /online/Session/AuthorisationChallenge | Inicjalizacja mechanizmu uwierzytelnienia i autoryzacji |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionInternalIdentifierGenerate | GET /online/Session/GenerateInternalIdentifier/{inputDigitsSequence} | Wygenerowanie identyfikatora wewnetrznego |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionSessionSignedInit | POST /online/Session/InitSigned | Inicjalizacja sesji, wskazanie kontekstu, uwierzytelnienie i autoryzacja |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionSessionStatusPlain | GET /online/Session/Status | Sprawdzenie statusu aktywnej sesji interaktywnej |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionSessionStatusReferenceNumber | GET /online/Session/Status/{ReferenceNumber} | Sprawdzenie statusu sesji ogólnej |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionSessionTerminatePlain | GET /online/Session/Terminate | Wymuszenie zamknięcia aktywnej sesji |
KseF.InterfejsyInteraktywneSesjaApi | onlineSessionSessionTokenInit | POST /online/Session/InitToken | Inicjalizacja sesji, wskazanie kontekstu, uwierzytelnienie i autoryzacja |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryContextCredentials | GET /online/Query/Credential/Context/Sync | Zapytanie o poświadczenia nadane przez jednostkę nadrzędną |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryCredentials | POST /online/Query/Credential/Sync | Zapytanie o poświadczenia |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryInvoice | POST /online/Query/Invoice/Sync | Zapytanie o faktury |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryInvoiceFetch | GET /online/Query/Invoice/Async/Fetch/{QueryElementReferenceNumber}/{PartElementReferenceNumber} | Pobranie wyników zapytania o faktury |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryInvoiceInit | POST /online/Query/Invoice/Async/Init | Inicjalizacja zapytania o faktury |
KseF.InterfejsyInteraktywneZapytaniaApi | onlineQueryQueryInvoiceStatus | GET /online/Query/Invoice/Async/Status/{QueryElementReferenceNumber} | Sprawdzenie statusu zapytania o faktury |
- KseF.AuthenticationIdentifierType
- KseF.AuthorisationChallengeRequest
- KseF.AuthorisationChallengeResponse
- KseF.CredentialsBaseTypeObjectObject
- KseF.CredentialsContextType
- KseF.CredentialsIdentifierRequestIndividualCertificateFingerprintType
- KseF.CredentialsIdentifierRequestIndividualNipType
- KseF.CredentialsIdentifierRequestIndividualPeselType
- KseF.CredentialsIdentifierRequestIndividualType
- KseF.CredentialsIdentifierRequestInstitutionalNipType
- KseF.CredentialsIdentifierRequestInstitutionalType
- KseF.CredentialsIdentifierRequestInternalType
- KseF.CredentialsIdentifierRequestType
- KseF.CredentialsIdentifierResponseAuthorisationTokenType
- KseF.CredentialsIdentifierResponseIndividualCertificateFingerprintType
- KseF.CredentialsIdentifierResponseIndividualNipType
- KseF.CredentialsIdentifierResponseIndividualPeselType
- KseF.CredentialsIdentifierResponseInstitutionalNipType
- KseF.CredentialsIdentifierResponseInternalIdentifierType
- KseF.CredentialsIdentifierResponseSystemType
- KseF.CredentialsIdentifierResponseType
- KseF.CredentialsParentType
- KseF.CredentialsPlainType
- KseF.CredentialsRoleRequestContextBaseType
- KseF.CredentialsRoleRequestContextDescribedType
- KseF.CredentialsRoleRequestStandardBaseType
- KseF.CredentialsRoleRequestStandardDescribedType
- KseF.CredentialsRoleRequestTokenType
- KseF.CredentialsRoleResponseBaseTypeObject
- KseF.CredentialsRoleResponseGrantedForInstitutionType
- KseF.CredentialsRoleResponseStandardContextDetailsType
- KseF.CredentialsRoleResponseStandardDetailsType
- KseF.CredentialsRoleResponseStandardPlainType
- KseF.CredentialsRoleResponseTokenType
- KseF.CredentialsTokenType
- KseF.ExceptionDetailType
- KseF.ExceptionResponse
- KseF.ExceptionType
- KseF.File1MBHashType
- KseF.File2MBHashType
- KseF.FileUnlimitedHashType
- KseF.GenerateTokenRequest
- KseF.GenerateTokenRequestType
- KseF.GenerateTokenResponse
- KseF.GetPaymentIdentifierReferenceNumbersResponse
- KseF.GrantContextCredentialsRequest
- KseF.GrantContextCredentialsRequestType
- KseF.GrantCredentialsRequest
- KseF.GrantCredentialsRequestType
- KseF.HashSHAType
- KseF.InitSessionResponse
- KseF.InitialisedSessionType
- KseF.InternalIdentifierGeneratedResponse
- KseF.InvoiceDivisionPlainPartType
- KseF.InvoiceHeaderType
- KseF.InvoicePayloadEncryptedType
- KseF.InvoicePayloadPlainType
- KseF.InvoicePayloadType
- KseF.InvoiceStatusType
- KseF.QueryCriteriaCredentialsAllType
- KseF.QueryCriteriaCredentialsIdType
- KseF.QueryCriteriaCredentialsType
- KseF.QueryCriteriaInvoiceDetailType
- KseF.QueryCriteriaInvoiceIncrementalType
- KseF.QueryCriteriaInvoiceRangeType
- KseF.QueryCriteriaInvoiceType
- KseF.QueryInvoiceAsyncInitResponse
- KseF.QueryInvoiceAsyncStatusResponse
- KseF.QueryInvoiceRequest
- KseF.QueryInvoiceSyncResponse
- KseF.QuerySyncCredentialsRequest
- KseF.QuerySyncCredentialsResponse
- KseF.RequestPaymentIdentifierRequest
- KseF.RequestPaymentIdentifierResponse
- KseF.RevokeContextCredentialsRequest
- KseF.RevokeContextCredentialsRequestType
- KseF.RevokeCredentialsRequest
- KseF.RevokeCredentialsRequestType
- KseF.RevokeTokenRequest
- KseF.RevokeTokenRequestType
- KseF.SendInvoiceRequest
- KseF.SendInvoiceResponse
- KseF.SessionContextType
- KseF.SessionInvoiceStatusType
- KseF.SessionStatusResponse
- KseF.StatusCredentialsResponse
- KseF.StatusInvoiceResponse
- KseF.SubjectAuthorizedType
- KseF.SubjectByType
- KseF.SubjectCompleteNameType
- KseF.SubjectFullNameType
- KseF.SubjectIdentifierByCompanyType
- KseF.SubjectIdentifierByType
- KseF.SubjectIdentifierInternalType
- KseF.SubjectIdentifierOtherToCompanyType
- KseF.SubjectIdentifierOtherToInternalType
- KseF.SubjectIdentifierOtherToNoneType
- KseF.SubjectIdentifierOtherToNrIdType
- KseF.SubjectIdentifierOtherToType
- KseF.SubjectIdentifierOtherToVatUeType
- KseF.SubjectIdentifierToCompanyType
- KseF.SubjectIdentifierToNoneType
- KseF.SubjectIdentifierToOtherType
- KseF.SubjectIdentifierToType
- KseF.SubjectIdentifierToVatUeType
- KseF.SubjectNameType
- KseF.SubjectNoneType
- KseF.SubjectOtherType
- KseF.SubjectPersonNameType
- KseF.SubjectToType
- KseF.TerminateSessionResponse
- KseF.V2CredentialsRoleGrantedForInstitutionInheritanceType
- KseF.V2CredentialsRoleResponseBaseTypeObject
- KseF.V2CredentialsRoleResponseGrantedByInstitutionType
- KseF.V2CredentialsRoleResponseGrantedForIndividualDirectType
- KseF.V2CredentialsRoleResponseGrantedForIndividualInheritedType
- KseF.V2CredentialsRoleResponseGrantedForIndividualTokenType
- KseF.V2InitSessionResponse
- KseF.V2InitialisedSessionType
- KseF.V2QueryCriteriaInvoiceDetailType
- KseF.V2QueryCriteriaInvoiceIncrementalType
- KseF.V2QueryCriteriaInvoiceRangeType
- KseF.V2QueryCriteriaInvoiceType
- KseF.V2QueryInvoiceRequest
- KseF.V2RevokeTokenRequest
- KseF.V2RevokeTokenRequestType
- KseF.V2RevokeTokenResponse
- KseF.V2SessionContextType
- KseF.V2SubjectByQueryType
- KseF.V2SubjectToQueryType
- Type: API key
- API key parameter name: SessionToken
- Location: HTTP header