Import
Endpoints for Import
Endpoints for Import
GET/api/v1/import
Authentication: Bearer token (JWT)
pagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: 50orderBystringOptional"createdAt"Allowed values: "createdAt", "id", "updatedAt"orderDirectionstringOptional"desc"Allowed values: "asc", "desc"itemsarray of ImportHistoryResponseRequired7 fieldsitemsidnumberRequired when parent is presentField path: items[].idcreatedAtcurlcurl https://api.subrite.no/api/v1/import \
--header 'Authorization: Bearer <token>'GET/api/v1/import/history/{id}
Authentication: Bearer token (JWT)
idnumberRequiredformatstringRequired"csv", "xlsx", "xls", "DAT", "pdf", "xml"PATCH/api/v1/import/members
Authentication: Bearer token (JWT)
multipart/form-dataidentifierstringRequiredfilefileRequiredPATCH/api/v1/import/members/check-consent-has-configured
Authentication: Bearer token (JWT)
multipart/form-datafilefileOptionalGET/api/v1/import/members/fields
Authentication: Bearer token (JWT)
availableFieldsarray of stringPATCH/api/v1/import/external-payments
Authentication: Bearer token (JWT)
multipart/form-dataSame fields as Update members info by uploading file (Request body).
POST/api/v1/import/ocr
Authentication: Bearer token (JWT)
multipart/form-dataSame fields as Check if consent has configured (Request body).
This response has no body.
POST/api/v1/import/subscriptions/validate
Authentication: Bearer token (JWT)
multipart/form-dataSame fields as Check if consent has configured (Request body).
Validation completed with list of existing emails
POST/api/v1/import/subscriptions
Authentication: Bearer token (JWT)
multipart/form-dataSame fields as Check if consent has configured (Request body).
GET/api/v1/import/ocr-file-sftp
Authentication: Bearer token (JWT)
This response has no body.
unauthorized
string (date-time)createdBystringRequired when parent is presentField path: items[].createdByadminUserIdnumberRequired when parent is presentField path: items[].adminUserIdtypestringRequired when parent is presentField path: items[].type"update_members", "ocr", "external_payment", "subscriptions"fileNamestringRequired when parent is presentField path: items[].fileNamereferencestringRequired when parent is presentField path: items[].referencemetaPageMetaRequired6 fieldsmetapagenumberRequiredField path: meta.pagetakenumberRequiredField path: meta.takecountnumberRequiredField path: meta.countpageCountnumberRequiredField path: meta.pageCounthasPreviousPagebooleanRequiredField path: meta.hasPreviousPagehasNextPagebooleanRequiredField path: meta.hasNextPage{
"items": [
{}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}unauthorized
This response has no body.
forbiddenResource
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/import/history/{id}?format=csv' \
--header 'Authorization: Bearer <token>'application/jsonsuccessCountnumberRequired0failureCountnumberRequired0failedUpdatesarray of FailedUpdatesRequiredDefault: []5 fieldsfailedUpdatesidentifierobjectRequired when parent is presentField path: failedUpdates[].identifierfieldNamestringField path: failedUpdates[].fieldNameerrorMessagestringRequired when parent is presentField path: failedUpdates[].errorMessagedetailstringField path: failedUpdates[].detailerrorTypestringField path: failedUpdates[].errorType{
"successCount": 0,
"failureCount": 0,
"failedUpdates": []
}invalidInputFormat, duplicateUniqueKey
This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/members \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--form 'identifier=string' \
--form 'file=@<file>'application/jsonNo named fields are defined for this schema.
trueinvalidInputFormat, duplicateUniqueKey
This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/members/check-consent-has-configured \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--form 'file=@<file>'availableIdentifiersarray of stringRequirednotUpdatableFieldsarray of stringRequiredconsentKeysarray of ConsentResponseDtoRequired22 fieldsconsentKeysintegrationIdstringRequired when parent is presentField path: consentKeys[].integrationIdtitlestringRequired when parent is presentField path: consentKeys[].titledescriptionstringRequired when parent is presentField path: consentKeys[].descriptionimagestringRequired when parent is presentField path: consentKeys[].imageshowOnCheckoutPagebooleanRequired when parent is presentField path: consentKeys[].showOnCheckoutPageshowOnMyPagebooleanRequired when parent is presentField path: consentKeys[].showOnMyPagestatusbooleanRequired when parent is presentField path: consentKeys[].statuspurposestringRequired when parent is presentField path: consentKeys[].purpose"marketing_and_newsletter", "consent"frequencystringRequired when parent is presentField path: consentKeys[].frequencydefaultSubscribedbooleanRequired when parent is presentField path: consentKeys[].defaultSubscribedsortOrdernumberRequired when parent is presentField path: consentKeys[].sortOrdervisibilitystringRequired when parent is presentField path: consentKeys[].visibility"subscriber", "nonSubscriber", "all"newsletterProviderConfigNewsletterProviderConfigRequired when parent is presentField path: consentKeys[].newsletterProviderConfig11 fieldsconsentKeys[].newsletterProviderConfigproviderstringRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.provider"mailchimp", "make", "mailmojo"namestringRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.nametenantIdnumberRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.tenantIdnewsletterProviderConfigIdnumberRequired when parent is presentField path: consentKeys[].newsletterProviderConfigIdtenantIdnumberRequired when parent is presentField path: consentKeys[].tenantIdtenantTenantRequired when parent is presentField path: consentKeys[].tenantNested fields omitted: field limit.communicationsarray of CommunicationRequired when parent is presentField path: consentKeys[].communications36 fieldsconsentKeys[].communicationsnamestringRequired when parent is presentField path: consentKeys[].communications[].namestatusstringRequired when parent is presentField path: consentKeys[].communications[].status"draft", "ready", "scheduled", "completed", "failed", "processing"smsContentstringRequired when parent is presentField path: consentKeys[].communications[].smsContentidnumberRequired when parent is presentField path: consentKeys[].idcreatedAtstring (date-time)Required when parent is presentField path: consentKeys[].createdAtupdatedAtstring (date-time)Required when parent is presentField path: consentKeys[].updatedAtdeletedAtstring (date-time)Required when parent is presentField path: consentKeys[].deletedAtmetaDataobjectRequired when parent is presentField path: consentKeys[].metaData{
"availableFields": [
"string"
],
"availableIdentifiers": [
"string"
],
"notUpdatableFields": [
"string"
],
"consentKeys": [
{
"communications": [],
"metaData": {}
}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/members/fields \
--header 'Authorization: Bearer <token>'ImportSummarySame fields as Update members info by uploading file (200).
{
"successCount": 0,
"failureCount": 0,
"failedUpdates": []
}invalidInputFormat, duplicateUniqueKey
This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/external-payments \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--form 'identifier=string' \
--form 'file=@<file>'application/jsoninvalidInputFormat
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/import/ocr \
--request POST \
--header 'Authorization: Bearer <token>' \
--form 'file=@<file>'SubscriptionImportValidationResponseDtoexistingMembersarray of stringRequired{
"existingMembers": [
"john@example.com",
"<phone>"
]
}Same fields as Validate subscription import file before import (200).
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/subscriptions/validate \
--request POST \
--header 'Authorization: Bearer <token>' \
--form 'file=@<file>'Same fields as Update members info by uploading file (200).
{
"successCount": 0,
"failureCount": 0,
"failedUpdates": []
}shouldNotExistForUnpaidSubscription, shouldExistForPaidSubscription, invalidFieldValue, duplicateFieldValue, shouldNotExistForFreeSubscription, invalidFieldValue, shouldNotExistForHiddenProduct, exceedsMaxAllowedQuantity, missingRequiredOptionalProduct
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
curlcurl https://api.subrite.no/api/v1/import/subscriptions \
--request POST \
--header 'Authorization: Bearer <token>' \
--form 'file=@<file>'This response has no body.
forbiddenResource
Same fields as Get all import histories of the tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/import/ocr-file-sftp \
--header 'Authorization: Bearer <token>'configNewsletterConfigRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.configNested fields omitted: depth limit.tenantTenantRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.tenantNested fields omitted: depth limit.consentsarray of ConsentRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.consentsNested fields omitted: depth limit.idnumberRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.idcreatedAtstring (date-time)Required when parent is presentField path: consentKeys[].newsletterProviderConfig.createdAtupdatedAtstring (date-time)Required when parent is presentField path: consentKeys[].newsletterProviderConfig.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: consentKeys[].newsletterProviderConfig.deletedAtmetaDataobjectRequired when parent is presentField path: consentKeys[].newsletterProviderConfig.metaDatasubjectstringemailEditorRawContentobjectRequired when parent is presentField path: consentKeys[].communications[].emailEditorRawContentcommunicationTypestringRequired when parent is presentField path: consentKeys[].communications[].communicationType"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired when parent is presentField path: consentKeys[].communications[].communicationChannel"sms", "email"scheduledAtstring (date-time)Required when parent is presentField path: consentKeys[].communications[].scheduledAtcompletedAtstring (date-time)Required when parent is presentField path: consentKeys[].communications[].completedAtadminUserIdnumberRequired when parent is presentField path: consentKeys[].communications[].adminUserIdtenantIdnumberRequired when parent is presentField path: consentKeys[].communications[].tenantIdconsentIdnumberRequired when parent is presentField path: consentKeys[].communications[].consentIdsegmentIdnumberRequired when parent is presentField path: consentKeys[].communications[].segmentIdtemplateIdnumberRequired when parent is presentField path: consentKeys[].communications[].templateIdemailPreviewTextstringRequired when parent is presentField path: consentKeys[].communications[].emailPreviewTextdeliveryMethodstringRequired when parent is presentField path: consentKeys[].communications[].deliveryMethodexternalEmailBodystringRequired when parent is presentField path: consentKeys[].communications[].externalEmailBodyemailHtmlPreviewstringRequired when parent is presentField path: consentKeys[].communications[].emailHtmlPreviewhostNamestringRequired when parent is presentField path: consentKeys[].communications[].hostNamesenderIdnumberRequired when parent is presentField path: consentKeys[].communications[].senderIdtotalRecipientsnumberRequired when parent is presentField path: consentKeys[].communications[].totalRecipientstotalPagesnumberRequired when parent is presentField path: consentKeys[].communications[].totalPagesaudienceBasisstringRequired when parent is presentField path: consentKeys[].communications[].audienceBasiscustomerWindowMonthsnumberRequired when parent is presentField path: consentKeys[].communications[].customerWindowMonthssenderCommunicationSenderRequired when parent is presentField path: consentKeys[].communications[].senderNested fields omitted: depth limit.adminUserUserRequired when parent is presentField path: consentKeys[].communications[].adminUserNested fields omitted: depth limit.tenantTenantRequired when parent is presentField path: consentKeys[].communications[].tenantNested fields omitted: depth limit.consentConsentRequired when parent is presentField path: consentKeys[].communications[].consentNested fields omitted: depth limit.segmentSegmentRequired when parent is presentField path: consentKeys[].communications[].segmentNested fields omitted: depth limit.templateCommunicationTemplateRequired when parent is presentField path: consentKeys[].communications[].templateNested fields omitted: depth limit.communicationLogsarray of CommunicationLogRequired when parent is presentField path: consentKeys[].communications[].communicationLogsNested fields omitted: depth limit.idnumberRequired when parent is presentField path: consentKeys[].communications[].idcreatedAtstring (date-time)Required when parent is presentField path: consentKeys[].communications[].createdAtupdatedAtstring (date-time)Required when parent is presentField path: consentKeys[].communications[].updatedAtdeletedAtstring (date-time)Required when parent is presentField path: consentKeys[].communications[].deletedAtmetaDataobjectRequired when parent is presentField path: consentKeys[].communications[].metaData