Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page:

...

Use these methods to retrieve informations about your environment (profiles, packages and languages) and configure your environment.

Note that all management resource requests ignore ExternalUserId value, so your client can perform these requests having or not this value.

...

Note

  1. Min e Max equals to the minimum and maximum number of packages manageable by selected profile.

...

HTTP Status CodeWhenMessage
403 ForbiddenUnexisting id_profileYou cannot access to provided profile.
id_profile not assigned to specified IdConsoleRetailer

Account

...

 

Use these methods to manage retailer's customers accounts. With these methods you can create new accounts, add or remove packages and get what you need to login to accounts.

 

Note that all account resource requests need an ExternalUserId value, so you have to authenticate specifying the retailer's customer unique identifier. APIs validates client requests forbiddening the access if:

  • AccessToken contains an empty ExternalUserId
  • AccessToken contains an ExternalUserId that hasn't got the the right scope to perform required operation.

Create a retailer's customer account

Description

Create a retailer's customer account

HTTP Method

POST

URL

Code Block
https://services.mailup.com/API/v1.1/Rest/RetailerService.svc/Account/Activation/Profile/{id_Profile}/Language/{lang}

JSON request (example)

Expand
Code Block
{
	"IpAddress":"192.168.0.1",
	"Email":"service@retailer.it",
	"CustomDomain":"power-email-marketing.it",
	"CustomSubdomain":"customer123",
	"ServiceName":"Power email marketing",
	"ServiceUrl":"www.power-email-marketing.it/info",
	"ServiceLogoutUrl":"www.power-email-marketing.it",
	"Referer":"",
	"UserAgent: ""
}

JSON response (example)

Expand

 

 

Code Block
{
	"Code":0,
	"Description":"Ok",
	"IdActivation":9054,
	"Hash":"767eed52-be08-4eb4-8658-5db4eaa215e1",
	"ControlPanelDomain":"customer123.mailadmin.io",
	"ImageTrackingDomain":"img.customer123.t.power-email-marketing.it",
	"LinkTrackingDomain":"customer123.t.power-email-marketing.it"
}

 

 

Paging and filtering (example)

none


Http verb
Status
colourBlue
titlePOST
Resource URLAccount/Activation/Profile/{id_Profile}/Language/{lang}
Request API
 RequiredWhere
id_ProfileXURL
langXURL
IpAddressXForm request
UserAgent Form request
Referer Form request
EmailXForm request
CustomDomainXForm request
CustomSubdomainXForm request
ServiceNameXForm request
ServiceUrlXForm request
ServiceLogoutUrlXForm request
Request ADM
 RequiredWhoWhere
ExternalUserIdXAuthorizationCodeAuthorization Flow
IdAnagraficaXIdAnagrafica field of Newsletter table where id = DeveloperId of APIConsumerApplicationDatabase
IdProfiloXGiven by ResellerRequest API
IPXGiven by ResellerRequest API
UserAgent Given by ResellerRequest API
Referer Given by ResellerRequest API
EmailXGiven by ResellerRequest API
LangXGiven by ResellerRequest API
CustomDomainXGiven by ResellerRequest API
Return value

An object containing these fields:

  • id_Activation
  • Hash
  • Code
  • Description
  • ControlPanelDomain
  • LinkTrackingDomain
  • ImageTrackingDomain. 


Code and description return these values:

  • Code: -1, Description: Unknown account activation status
  • Code: 0, Description: Ok
  • Code: 1, Description: Processing
  • Code: 2, Description: Error
  • Code: 3, Description: Language 'XX' is not available for profile YY.
  • Code: 4, Description: IpAddress cannot be null, empty or invalid.
  • Code: 5, Description: Email cannot be null, empty or invalid.
  • Code: 6, Description: Domains cannot be null, empty or invalid.
  • Code: 7, Description: Custom domain not available.
  • Code: 8, Description: Link tracking domain not available

  • Code: 9, Description: Image tracking domain not available

  • Code: 10, Description: Service name cannot be null, empty or invalid.
  • Code: 11, Description: Service url cannot be null, empty or invalid.
  • Code: 12, Description: Service logout url cannot be null, empty or invalid.

...

Http verb
Status
colourYellow
titlePUT
Resource URL

Account/{id_Account}/Profile/{id_Profile}

NOTE: the id_Account is the value returned with Get reseller's customer account profile activation status resource

Request API
 RequiredWhere
id_AccountXURL
id_ProfileXURL
Request ADM
 RequiredWhoWhere
id_AccountXGiven by ResellerRequest API
id_ProfileXGiven by ResellerRequest API
Return value

-

NOTE: the return value is the HTTP Status code of the response. ADM executes this operation asynchronously. Every time the reseller invokes the resource, ADM returns a code. If this code tells that the operations are still in progress the resource returns an 202 Accepted status code; otherwise returns a 200 OK status code. If an error occurred it returns 500 Internal Server Error.

NOTE 2: the reseller can invoke the resource as many times as it wants.

WHEN REQUESTS FAIL:

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

...

Http verb
Status
colourYellow
titlePUT
Resource URL

Account/{id_Account} or Account/{id_Account}?Enable=false

NOTE: the id_Account is the value returned with Get reseller's customer account profile activation status resource

Request API
 RequiredWhere
id_AccountXURL
Enable Querystring
Request ADMNone
Return value

The resource returns a 200 OK status code and and object containing account status properties.

In detail the returned object actually contains:

    • Code: int value corresponding to the account status code
      • 0: Active
      • 1: Deactivated
    • Description: human readable description of the account status code
      • Active
      • Deactivated
    • ValidFrom: String corresponding to the validity start date
    • ValidTo: String corresponding to the validity end date

WHEN REQUESTS FAIL:

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

...

Http verb
Status
colourYellow
titlePUT
Resource URL

Account/{id_Account} or Account/{id_Account}?Enable=true

NOTE: the id_Account is the value returned with Get reseller's customer account profile activation status resource

Request API
 RequiredWhere
id_AccountXURL
Enable XQuerystring
Request ADMNone
Return value

The resource returns a 200 OK status code and and object containing account status properties.

In detail the returned object actually contains:

  • Code: int value corresponding to the account status code
    • 0: Active
    • 1: Deactivated
  • Description: human readable description of the account status code
    • Active
    • Deactivated
  • ValidFrom: String corresponding to the validity start date
  • ValidTo: String corresponding to the validity end date

WHEN REQUESTS FAIL:

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

...

Http verb
Status
colourRed
titleDELETE
Resource URL

Account/{id_Account}

NOTE: the id_Account is the value returned with Get reseller's customer account profile activation status resource

Request API
 RequiredWhere
id_AccountXURL
Request ADMTBD
Return valueThe resource returns a 200 OK status code.

WHEN REQUESTS FAIL:

HTTP Status CodeWhenMessage
400 BadRequestExternalUserId empty.Invalid ExternalUserId.
ExternalUserId validation fails

...

Http verb
Status
colourBlue
titlePOST
Resource URL

Account/{id_Account}/Pack/{id_Pack}

NOTE: the id_Account is the value returned with Get reseller's customer account profile activation status resource

Request API
 RequiredWhere
id_AccountXURL
id_PackXURL
QuantityXBody
WorkModeXBody

WorkMode should be "incremental" or "absolute" and refers to the way to manage packages.

The "incremental" work mode allows client to add or remove packages as defined by Quantity field. If client calls the method 3 times with quantity equals to 1, API method adds 1 package each time. If client needs to remove a package it calls the method with quantity equals to -1 and API method removes a package.

The "absolute" work mode allows client to define the total number of packages.If client calls the method with quantity equals to 4, API method adds 4 packages. If client needs to remove 2 packages from the current quantity (set to 4 by the previews call) it calls the method with quantity equals to 2 and the API method removes 2 packages.

NB: "absolute" work mode allows only unsigned value for Quantity.

 

Request ADM
 RequiredWhoWhere
id_AccountXGiven by ResellerRequest API
id_PackXGiven by ResellerRequest API
Return value

In detail the returned object actually contains:

  • Code: int value corresponding to the account status code
    • 0: Ok
    • 1: Quantity_limits_exceeded
    • 2: Profile_rules_error
    • 3: Invalid_quantity
    • 4: Invalid_workmode
  • Description: human readable description of the account status code
    • Ok
    • Quantity limits exceeded
    • Profile rules error
    • Invalid quantity
    • Invalid workmode

NOTE: the resource returns a 200 OK status code if the package was added succesfully and the response contains code = 0; if the addition does not end propertly, the resource returns a 403 Forbidden and the response contains code = 1

WHEN REQUESTS RUN:

  • the response contains an object with:
    • Code = 0
    • Description = Ok

...