1.0.3 • Published 4 years ago

pakat-api-v3-sdk v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Pakat's API v3 Node.js Library

Pakat's API exposes the entire Pakat features via a standardized programmatic interface. Please refer to the full documentation to learn more. Pakat is a proxy for SendinBlue.

This is the wrapper for the API. It implements all the features of the API v3. It supports promises.

Pakat's API matches the OpenAPI v2 definition. The specification can be downloaded here.

This library is automatically generated by the Swagger Codegen project and is reviewed and maintained by SendinBlue:

  • API version: 3.0.0
  • Package version: 8.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs.

Then install it via:

npm install pakat-api-v3-sdk --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your pakat-api-v3-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('pakat-api-v3-sdk') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/irandoust/pakat-APIv3-nodejs-library then install it via:

    npm install irandoust/pakat-APIv3-nodejs-library --save

Webpack Configuration

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
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var PakatApiV3Sdk = require('pakat-api-v3-sdk');

var defaultClient = PakatApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['api-key'] = "Token"

// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix['partner-key'] = "Token"

var api = new PakatApiV3Sdk.AccountApi()
api.getAccount().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.sendinblue.com/v3

ClassMethodHTTP requestDescription
PakatApiV3Sdk.AccountApigetAccountGET /accountGet your account information, plan and credits details
PakatApiV3Sdk.AttributesApicreateAttributePOST /contacts/attributes/{attributeCategory}/{attributeName}Create contact attribute
PakatApiV3Sdk.AttributesApideleteAttributeDELETE /contacts/attributes/{attributeCategory}/{attributeName}Delete an attribute
PakatApiV3Sdk.AttributesApigetAttributesGET /contacts/attributesList all attributes
PakatApiV3Sdk.AttributesApiupdateAttributePUT /contacts/attributes/{attributeCategory}/{attributeName}Update contact attribute
PakatApiV3Sdk.ContactsApiaddContactToListPOST /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
PakatApiV3Sdk.ContactsApicreateAttributePOST /contacts/attributes/{attributeCategory}/{attributeName}Create contact attribute
PakatApiV3Sdk.ContactsApicreateContactPOST /contactsCreate a contact
PakatApiV3Sdk.ContactsApicreateDoiContactPOST /contacts/doubleOptinConfirmationCreate Contact via DOI (Double-Opt-In) Flow
PakatApiV3Sdk.ContactsApicreateFolderPOST /contacts/foldersCreate a folder
PakatApiV3Sdk.ContactsApicreateListPOST /contacts/listsCreate a list
PakatApiV3Sdk.ContactsApideleteAttributeDELETE /contacts/attributes/{attributeCategory}/{attributeName}Delete an attribute
PakatApiV3Sdk.ContactsApideleteContactDELETE /contacts/{identifier}Delete a contact
PakatApiV3Sdk.ContactsApideleteFolderDELETE /contacts/folders/{folderId}Delete a folder (and all its lists)
PakatApiV3Sdk.ContactsApideleteListDELETE /contacts/lists/{listId}Delete a list
PakatApiV3Sdk.ContactsApigetAttributesGET /contacts/attributesList all attributes
PakatApiV3Sdk.ContactsApigetContactInfoGET /contacts/{identifier}Get a contact's details
PakatApiV3Sdk.ContactsApigetContactStatsGET /contacts/{identifier}/campaignStatsGet email campaigns' statistics for a contact
PakatApiV3Sdk.ContactsApigetContactsGET /contactsGet all the contacts
PakatApiV3Sdk.ContactsApigetContactsFromListGET /contacts/lists/{listId}/contactsGet contacts in a list
PakatApiV3Sdk.ContactsApigetFolderGET /contacts/folders/{folderId}Returns a folder's details
PakatApiV3Sdk.ContactsApigetFolderListsGET /contacts/folders/{folderId}/listsGet lists in a folder
PakatApiV3Sdk.ContactsApigetFoldersGET /contacts/foldersGet all folders
PakatApiV3Sdk.ContactsApigetListGET /contacts/lists/{listId}Get a list's details
PakatApiV3Sdk.ContactsApigetListsGET /contacts/listsGet all the lists
PakatApiV3Sdk.ContactsApiimportContactsPOST /contacts/importImport contacts
PakatApiV3Sdk.ContactsApiremoveContactFromListPOST /contacts/lists/{listId}/contacts/removeDelete a contact from a list
PakatApiV3Sdk.ContactsApirequestContactExportPOST /contacts/exportExport contacts
PakatApiV3Sdk.ContactsApiupdateAttributePUT /contacts/attributes/{attributeCategory}/{attributeName}Update contact attribute
PakatApiV3Sdk.ContactsApiupdateContactPUT /contacts/{identifier}Update a contact
PakatApiV3Sdk.ContactsApiupdateFolderPUT /contacts/folders/{folderId}Update a folder
PakatApiV3Sdk.ContactsApiupdateListPUT /contacts/lists/{listId}Update a list
PakatApiV3Sdk.EmailCampaignsApicreateEmailCampaignPOST /emailCampaignsCreate an email campaign
PakatApiV3Sdk.EmailCampaignsApideleteEmailCampaignDELETE /emailCampaigns/{campaignId}Delete an email campaign
PakatApiV3Sdk.EmailCampaignsApiemailExportRecipientsPOST /emailCampaigns/{campaignId}/exportRecipientsExport the recipients of an email campaign
PakatApiV3Sdk.EmailCampaignsApigetAbTestCampaignResultGET /emailCampaigns/{campaignId}/abTestCampaignResultGet an A/B test email campaign results
PakatApiV3Sdk.EmailCampaignsApigetEmailCampaignGET /emailCampaigns/{campaignId}Get an email campaign report
PakatApiV3Sdk.EmailCampaignsApigetEmailCampaignsGET /emailCampaignsReturn all your created email campaigns
PakatApiV3Sdk.EmailCampaignsApigetSharedTemplateUrlGET /emailCampaigns/{campaignId}/sharedUrlGet a shared template url
PakatApiV3Sdk.EmailCampaignsApisendEmailCampaignNowPOST /emailCampaigns/{campaignId}/sendNowSend an email campaign immediately, based on campaignId
PakatApiV3Sdk.EmailCampaignsApisendReportPOST /emailCampaigns/{campaignId}/sendReportSend the report of a campaign
PakatApiV3Sdk.EmailCampaignsApisendTestEmailPOST /emailCampaigns/{campaignId}/sendTestSend an email campaign to your test list
PakatApiV3Sdk.EmailCampaignsApiupdateCampaignStatusPUT /emailCampaigns/{campaignId}/statusUpdate an email campaign status
PakatApiV3Sdk.EmailCampaignsApiupdateEmailCampaignPUT /emailCampaigns/{campaignId}Update an email campaign
PakatApiV3Sdk.EmailCampaignsApiuploadImageToGalleryPOST /emailCampaigns/imagesUpload an image to your account's image gallery
PakatApiV3Sdk.FoldersApicreateFolderPOST /contacts/foldersCreate a folder
PakatApiV3Sdk.FoldersApideleteFolderDELETE /contacts/folders/{folderId}Delete a folder (and all its lists)
PakatApiV3Sdk.FoldersApigetFolderGET /contacts/folders/{folderId}Returns a folder's details
PakatApiV3Sdk.FoldersApigetFolderListsGET /contacts/folders/{folderId}/listsGet lists in a folder
PakatApiV3Sdk.FoldersApigetFoldersGET /contacts/foldersGet all folders
PakatApiV3Sdk.FoldersApiupdateFolderPUT /contacts/folders/{folderId}Update a folder
PakatApiV3Sdk.ListsApiaddContactToListPOST /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
PakatApiV3Sdk.ListsApicreateListPOST /contacts/listsCreate a list
PakatApiV3Sdk.ListsApideleteListDELETE /contacts/lists/{listId}Delete a list
PakatApiV3Sdk.ListsApigetContactsFromListGET /contacts/lists/{listId}/contactsGet contacts in a list
PakatApiV3Sdk.ListsApigetFolderListsGET /contacts/folders/{folderId}/listsGet lists in a folder
PakatApiV3Sdk.ListsApigetListGET /contacts/lists/{listId}Get a list's details
PakatApiV3Sdk.ListsApigetListsGET /contacts/listsGet all the lists
PakatApiV3Sdk.ListsApiremoveContactFromListPOST /contacts/lists/{listId}/contacts/removeDelete a contact from a list
PakatApiV3Sdk.ListsApiupdateListPUT /contacts/lists/{listId}Update a list
PakatApiV3Sdk.ProcessApigetProcessGET /processes/{processId}Return the informations for a process
PakatApiV3Sdk.ProcessApigetProcessesGET /processesReturn all the processes for your account
PakatApiV3Sdk.ResellerApiaddCreditsPOST /reseller/children/{childIdentifier}/credits/addAdd Email and/or SMS credits to a specific child account
PakatApiV3Sdk.ResellerApiassociateIpToChildPOST /reseller/children/{childIdentifier}/ips/associateAssociate a dedicated IP to the child
PakatApiV3Sdk.ResellerApicreateChildDomainPOST /reseller/children/{childIdentifier}/domainsCreate a domain for a child account
PakatApiV3Sdk.ResellerApicreateResellerChildPOST /reseller/childrenCreates a reseller child
PakatApiV3Sdk.ResellerApideleteChildDomainDELETE /reseller/children/{childIdentifier}/domains/{domainName}Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
PakatApiV3Sdk.ResellerApideleteResellerChildDELETE /reseller/children/{childIdentifier}Delete a single reseller child based on the child identifier supplied
PakatApiV3Sdk.ResellerApidissociateIpFromChildPOST /reseller/children/{childIdentifier}/ips/dissociateDissociate a dedicated IP to the child
PakatApiV3Sdk.ResellerApigetChildAccountCreationStatusGET /reseller/children/{childIdentifier}/accountCreationStatusGet the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied
PakatApiV3Sdk.ResellerApigetChildDomainsGET /reseller/children/{childIdentifier}/domainsGet all sender domains for a specific child account
PakatApiV3Sdk.ResellerApigetChildInfoGET /reseller/children/{childIdentifier}Get a child account's details
PakatApiV3Sdk.ResellerApigetResellerChildsGET /reseller/childrenGet the list of all children accounts
PakatApiV3Sdk.ResellerApigetSsoTokenGET /reseller/children/{childIdentifier}/authGet session token to access Sendinblue (SSO)
PakatApiV3Sdk.ResellerApiremoveCreditsPOST /reseller/children/{childIdentifier}/credits/removeRemove Email and/or SMS credits from a specific child account
PakatApiV3Sdk.ResellerApiupdateChildAccountStatusPUT /reseller/children/{childIdentifier}/accountStatusUpdate info of reseller's child account status based on the childIdentifier supplied
PakatApiV3Sdk.ResellerApiupdateChildDomainPUT /reseller/children/{childIdentifier}/domains/{domainName}Update the sender domain of reseller's child based on the childIdentifier and domainName passed
PakatApiV3Sdk.ResellerApiupdateResellerChildPUT /reseller/children/{childIdentifier}Update info of reseller's child based on the child identifier supplied
PakatApiV3Sdk.SMSCampaignsApicreateSmsCampaignPOST /smsCampaignsCreates an SMS campaign
PakatApiV3Sdk.SMSCampaignsApideleteSmsCampaignDELETE /smsCampaigns/{campaignId}Delete an SMS campaign
PakatApiV3Sdk.SMSCampaignsApigetSmsCampaignGET /smsCampaigns/{campaignId}Get an SMS campaign
PakatApiV3Sdk.SMSCampaignsApigetSmsCampaignsGET /smsCampaignsReturns the information for all your created SMS campaigns
PakatApiV3Sdk.SMSCampaignsApirequestSmsRecipientExportPOST /smsCampaigns/{campaignId}/exportRecipientsExport an SMS campaign's recipients
PakatApiV3Sdk.SMSCampaignsApisendSmsCampaignNowPOST /smsCampaigns/{campaignId}/sendNowSend your SMS campaign immediately
PakatApiV3Sdk.SMSCampaignsApisendSmsReportPOST /smsCampaigns/{campaignId}/sendReportSend an SMS campaign's report
PakatApiV3Sdk.SMSCampaignsApisendTestSmsPOST /smsCampaigns/{campaignId}/sendTestSend a test SMS campaign
PakatApiV3Sdk.SMSCampaignsApiupdateSmsCampaignPUT /smsCampaigns/{campaignId}Update an SMS campaign
PakatApiV3Sdk.SMSCampaignsApiupdateSmsCampaignStatusPUT /smsCampaigns/{campaignId}/statusUpdate a campaign's status
PakatApiV3Sdk.SendersApicreateSenderPOST /sendersCreate a new sender
PakatApiV3Sdk.SendersApideleteSenderDELETE /senders/{senderId}Delete a sender
PakatApiV3Sdk.SendersApigetIpsGET /senders/ipsGet all the dedicated IPs for your account
PakatApiV3Sdk.SendersApigetIpsFromSenderGET /senders/{senderId}/ipsGet all the dedicated IPs for a sender
PakatApiV3Sdk.SendersApigetSendersGET /sendersGet the list of all your senders
PakatApiV3Sdk.SendersApiupdateSenderPUT /senders/{senderId}Update a sender
PakatApiV3Sdk.TransactionalEmailsApicreateSmtpTemplatePOST /smtp/templatesCreate an email template
PakatApiV3Sdk.TransactionalEmailsApideleteHardbouncesPOST /smtp/deleteHardbouncesDelete hardbounces
PakatApiV3Sdk.TransactionalEmailsApideleteSmtpTemplateDELETE /smtp/templates/{templateId}Delete an inactive email template
PakatApiV3Sdk.TransactionalEmailsApigetAggregatedSmtpReportGET /smtp/statistics/aggregatedReportGet your transactional email activity aggregated over a period of time
PakatApiV3Sdk.TransactionalEmailsApigetEmailEventReportGET /smtp/statistics/eventsGet all your transactional email activity (unaggregated events)
PakatApiV3Sdk.TransactionalEmailsApigetSmtpReportGET /smtp/statistics/reportsGet your transactional email activity aggregated per day
PakatApiV3Sdk.TransactionalEmailsApigetSmtpTemplateGET /smtp/templates/{templateId}Returns the template information
PakatApiV3Sdk.TransactionalEmailsApigetSmtpTemplatesGET /smtp/templatesGet the list of email templates
PakatApiV3Sdk.TransactionalEmailsApigetTransacBlockedContactsGET /smtp/blockedContactsGet the list of blocked or unsubscribed transactional contacts
PakatApiV3Sdk.TransactionalEmailsApigetTransacEmailContentGET /smtp/emails/{uuid}Get the personalized content of a sent transactional email
PakatApiV3Sdk.TransactionalEmailsApigetTransacEmailsListGET /smtp/emailsGet the list of transactional emails on the basis of allowed filters
PakatApiV3Sdk.TransactionalEmailsApisendTemplatePOST /smtp/templates/{templateId}/sendSend a template
PakatApiV3Sdk.TransactionalEmailsApisendTestTemplatePOST /smtp/templates/{templateId}/sendTestSend a template to your test list
PakatApiV3Sdk.TransactionalEmailsApisendTransacEmailPOST /smtp/emailSend a transactional email
PakatApiV3Sdk.TransactionalEmailsApismtpBlockedContactsEmailDeleteDELETE /smtp/blockedContacts/{email}Unblock or resubscribe a transactional contact
PakatApiV3Sdk.TransactionalEmailsApismtpLogMessageIdDeleteDELETE /smtp/log/{messageId}Delete an SMTP transactional log
PakatApiV3Sdk.TransactionalEmailsApiupdateSmtpTemplatePUT /smtp/templates/{templateId}Update an email template
PakatApiV3Sdk.TransactionalSMSApigetSmsEventsGET /transactionalSMS/statistics/eventsGet all your SMS activity (unaggregated events)
PakatApiV3Sdk.TransactionalSMSApigetTransacAggregatedSmsReportGET /transactionalSMS/statistics/aggregatedReportGet your SMS activity aggregated over a period of time
PakatApiV3Sdk.TransactionalSMSApigetTransacSmsReportGET /transactionalSMS/statistics/reportsGet your SMS activity aggregated per day
PakatApiV3Sdk.TransactionalSMSApisendTransacSmsPOST /transactionalSMS/smsSend SMS message to a mobile number
PakatApiV3Sdk.WebhooksApicreateWebhookPOST /webhooksCreate a webhook
PakatApiV3Sdk.WebhooksApideleteWebhookDELETE /webhooks/{webhookId}Delete a webhook
PakatApiV3Sdk.WebhooksApigetWebhookGET /webhooks/{webhookId}Get a webhook details
PakatApiV3Sdk.WebhooksApigetWebhooksGET /webhooksGet all webhooks
PakatApiV3Sdk.WebhooksApiupdateWebhookPUT /webhooks/{webhookId}Update a webhook

Documentation for Models

Documentation for Authorization

api-key

  • Type: API key
  • API key parameter name: api-key
  • Location: HTTP header

partner-key

  • Type: API key
  • API key parameter name: partner-key
  • Location: HTTP header