On this page:
...
Note that all management resource requests ignore ExternalUserId value, so your client can perform these requests having or not this value.
Anchor | ||||
---|---|---|---|---|
|
Description | Get retailer-defined profiles | ||||
---|---|---|---|---|---|
HTTP Method | GET | ||||
URL |
| ||||
JSON request (example) | none | ||||
JSON response (example) |
| ||||
Paging and filtering (example) |
|
Get retailer-defined packages by profile
To retrieve available languages you need to provide this parameter:
Required | Where | Description | |
---|---|---|---|
id_Profile | X | URL | See get profile |
Description | Get retailer-defined profile-packages relationship | ||||
---|---|---|---|---|---|
HTTP Method | GET | ||||
URL |
| ||||
JSON request (example) | none | ||||
JSON response (example) |
| ||||
Paging and filtering (example) |
|
...
- Min e Max equals to the minimum and maximum number of packages manageable by selected profile.
Get the available languages by profile
...
Anchor GetLanguages GetLanguages
Get the available languages by profile
GetLanguages | |
GetLanguages |
...
HTTP Method
To retrieve available packages you need to provide this parameter:
Required | Where | Description | |
---|---|---|---|
id_Profile | X | URL | See get profile |
Description | Get the available languages by profile | ||||
---|---|---|---|---|---|
HTTP Method | GET | ||||
URL |
| ||||
JSON request (example) | none | ||||
JSON response (example) |
| ||||
Paging and filtering (example) | none |
...
The process to create an account could take some time. This method returns an activation identifier to prevent client hanging. When the method respondes, your clients has to poll the activation status method to understand when the creation process ends.
Description | Create a retailer's customer account | ||||
---|---|---|---|---|---|
HTTP Method | POST | ||||
URL |
| ||||
JSON request (example) |
| ||||
JSON response (example) |
| ||||
Paging and filtering (example) | none |
...
Status | ||||
---|---|---|---|---|
|
...
Required | Where | |
---|---|---|
id_Profile | X | URL |
lang | X | URL |
IpAddress | X | Form request |
UserAgent | Form request | |
Referer | Form request | |
X | Form request | |
CustomDomain | X | Form request |
CustomSubdomain | X | Form request |
ServiceName | X | Form request |
ServiceUrl | X | Form request |
ServiceLogoutUrl | X | Form request |
...
Required | Who | Where | |
---|---|---|---|
ExternalUserId | X | AuthorizationCode | Authorization Flow |
IdAnagrafica | X | IdAnagrafica field of Newsletter table where id = DeveloperId of APIConsumerApplication | Database |
IdProfilo | X | Given by Reseller | Request API |
IP | X | Given by Reseller | Request API |
UserAgent | Given by Reseller | Request API | |
Referer | Given by Reseller | Request API | |
X | Given by Reseller | Request API | |
Lang | X | Given by Reseller | Request API |
CustomDomain | X | Given by Reseller | Request API |
...
An object containing these fields:
- id_Activation
- Hash
- Code
- Description
- ControlPanelDomain
- LinkTrackingDomain
- ImageTrackingDomain.
...
Code: 8, Description: Link tracking domain not available
...
Code: 9, Description: Image tracking domain not available
...
To create a new account you have to provide this information:
Required | Where | Description | |
---|---|---|---|
id_Profile | X | URL | See get profile |
lang | X | URL | See get languages |
IpAddress | X | Body | Your client IP address |
X | Body | Your customer's email address | |
CustomDomain | X | Body | Your product or your customer domain |
CustomSubdomain | X | Body | Your product or your customer subdomain to address this service |
ServiceName | X | Body | Your product name |
ServiceUrl | X | Body | Your product web site |
ServiceLogoutUrl | X | Body | Address to redirect the customer when logouts |
UserAgent | Body | Your client user agent | |
Referer | Body | Your client referer |
This method returns an activation identifier to prevent client hanging. When the method respondes, your clients has to poll the activation status method to understand when the creation process ends. The response could contains domains that should be redirect to MailUp CNAMEs adding DNS records.
Description | Create a retailer's customer account | ||||
---|---|---|---|---|---|
HTTP Method | POST | ||||
URL |
| ||||
JSON request (example) |
| ||||
JSON response (example) |
| ||||
Paging and filtering (example) | none |
Errors
HTTP Status Code | When | Message | |
---|---|---|---|
400 BadRequest | Unexisting lang value into the TwoLetterISOLanguageName list. | Invalid language. | |
ExternalUserId empty. | Invalid ExternalUserId. | ||
403 Forbidden | No profiles for the ResellerId authentication code value. | You cannot access to provided profile. | |
Internal error occurred | Code: -1 Description: Unknown account activation status. | ||
You are not able to create this account | Code: 2 Description: Error | ||
Language provided is not allowed for this retailer's edition | Code: 3 Description: Language '{lang}' is not available for profile {id_Profile}. | ||
IpAddress is null, empty or IPAddress.TryParse fails | Code: 4 Description: IpAddress cannot be null, empty or invalid. | ||
IpAddress is null, empty or EmailHelper.ValidateAddress fails | Code: | 12, 5 Description: | Service logout url Email cannot be null, empty or invalid. |
WHEN REQUESTS RUN:
- ExternalUserId, id_Profile, lang, IpAddress, Email, ServiceName, ServiceUrl, ServiceLogoutUrl CustomSubdomain and CustomDomain MUST HAVE a value
- UserAgent and Referer could be empty
WHEN REQUESTS FAIL:
HTTP Status Code | When | Message | ||
---|---|---|---|---|
400 BadRequest | Unexisting lang value into the TwoLetterISOLanguageName list. | Invalid language. | ||
ExternalUserId empty. | Invalid ExternalUserId. | |||
No profiles for the ResellerId authentication code value. | You cannot access to provided profile. | IpAddress is null, empty or IPAddress.TryParse fails | Code: 4 Description: IpAddress Request contains some null, empty or invalid domain fields | Code: 6 Description: Domains cannot be null, empty or invalid. |
One or more domains not available | Code = 7; Description: Custom domain not available. | |||
Code: 8; Description: Link tracking domain not available | ||||
Code: 9; Description: Image tracking domain not available | ||||
Invalid retailer's service information | Code: 10; Description: Service name cannot be null, empty or invalid. | |||
IpAddress is null, empty or EmailHelper.ValidateAddress fails | Code: 511; Description: Email Service url cannot be null, empty or invalid. CustomDomain is null, empty or invalid | |||
Code: 612; Description: Custom domain Service logout url cannot be null, empty or invalid. | ||||
Custom domain not available | Code = 7; Description = Custom domain not available. | |||
ADM service checks the value is not allowed for reseller's editions | Code: 3 Description: Language '{lang}' is not available for profile {id_Profile}. |
NOTE:
...
Note
- It is possile to create ONLY ONE Trial Control Panels per ExternalUserId. If you try to create more Trial using the same ExternalUserId the response contains Code: 1, Description: Processing until the process ends and then it contains Code: 2, Description: Error.
- E' possibile creare PIU' account ECONOMY o PREMIUM per ExternalUserId. Se si cerca di creare un account economy o premium utilizzando un ExternalUserId già utilizzato, la risposta conterrà It is possile to create MORE non Trial Control Panels per ExternalUserId. If you try to create more non Trial using the same or another ExternalUserId the response contains Code: 1, Description: Processing fino a che il primo account non è stato creato, ed al termine della sua creazione conterrà Processing until the process ends and then it contains Code: 0, Description: Ok.
...
Http verb |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
| ||||||||||||
Request ADM |
| ||||||||||||
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 Code | When | Message |
---|---|---|
400 BadRequest | ExternalUserId empty. | Invalid ExternalUserId. |
ExternalUserId validation fails |
...
Http verb |
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
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 |
| |||||||||
Request ADM | None | |||||||||
Return value | The resource returns a 200 OK status code and and object containing account status properties. In detail the returned object actually contains:
|
WHEN REQUESTS FAIL:
HTTP Status Code | When | Message |
---|---|---|
400 BadRequest | ExternalUserId empty. | Invalid ExternalUserId. |
ExternalUserId validation fails |
...
Http verb |
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
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 |
| |||||||||
Request ADM | None | |||||||||
Return value | The resource returns a 200 OK status code and and object containing account status properties. In detail the returned object actually contains:
|
WHEN REQUESTS FAIL:
HTTP Status Code | When | Message |
---|---|---|
400 BadRequest | ExternalUserId empty. | Invalid ExternalUserId. |
ExternalUserId validation fails |
...
Http verb |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
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 |
| ||||||||
Request ADM | TBD | ||||||||
Return value | The resource returns a 200 OK status code. |
WHEN REQUESTS FAIL:
HTTP Status Code | When | Message |
---|---|---|
400 BadRequest | ExternalUserId empty. | Invalid ExternalUserId. |
ExternalUserId validation fails |
...
HTTP Status Code | When | Message |
---|---|---|
400 BadRequest | ExternalUserId empty. | Invalid ExternalUserId. |
ExternalUserId validation fails | ||
403 Forbidden | Invalid Id_Account | You cannot access to provided account. |
NOTE:
- La chiamata ritorna -1 se il metodo GetAccountStatus dei servizi ADM ritorna come ReturnCode 1 (Processing) o 2 (Error). Tale descrizione del ReturnCode viene settata come description in modo che si possa capire il motivo del fallimento. In realtà ReturnCode, in questo caso, varrà 0 (Ok) oppure 2 (Error) e MAI 1 (Processing).
- La proprietà ActivePacks restituisce informazioni relative allo stato attuale dei pacchetti. Il campo Quantity restituisce la somma algebrica dei pacchetti aggiunti/rimossi, mentre CurrentQuantity fornisce informazioni relative a quanti pacchetti sono attualmente in uso (un pacchetto potrebbe essere stato rimosso, ma l'effettiva rimozione avverrà a fine mese)
...
Http verb |
| |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
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 |
| |||||||||||||||
Return value | In detail the returned object actually contains:
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
...